Coder Social home page Coder Social logo

react-native-identicon's Introduction

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

react-native-identicon's People

Contributors

camilo5972 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

lovelycbm

react-native-identicon's Issues

When the value changes it doesn't change

I have created the Identicon element with a changeable value, but when the value changes, the Identicon doesn't change.
Also I have tried to create it inside useMemo but with no change.

const profilePicture = useMemo(() => {
    return <Identicon value={address} />;
  }, [address]);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.