Skip to content

camilo5972/react-native-identicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published