react-native-identicon
TypeScript icon, indicating that this package has built-in type declarations

1.0.14 • Public • Published

react-native-identicon

The core of the project is a clone of the repository: node-identicon. I only made the library wrapper as a component in addition to using other alternate libraries such as: react-native-crypto and react-native-canvas

Install

# TypeScript
npm install -g typescript
# Peer dependencies
npm install react-native-webview
npm install @types/node
npm install react-native-randombytes
npm install tradle/rn-nodeify --save-dev
# Hack some node modules. I recommend that you then put this inside the "postinstall" of the package.json
./node_modules/.bin/rn-nodeify --install 'stream,crypto,events,process' --hack

Running rn-nodeify generates a shim.js file in the root of the project. Import this file into the index.js:

/**
 * @format
 */
import './shim' // ==> Import Here
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';

AppRegistry.registerComponent(appName, () => App);
# Install component
npm install react-native-identicon
npx pod-install ios

Usage

import React from 'react';
import Identicon from 'react-native-identicon';

const App = () => {
    return (
        <Identicon value={'test'} />
    )
}

Optional parameters

  • style: object with container's styles
  • size: default 45

Readme

Keywords

Package Sidebar

Install

npm i react-native-identicon

Weekly Downloads

10

Version

1.0.14

License

ISC

Unpacked Size

9.08 kB

Total Files

6

Last publish

Collaborators

  • camilo5972