GithubHelp home page GithubHelp logo

mateioprea / react-native-random-values-jsi-helper Goto Github PK

View Code? Open in Web Editor NEW
34.0 3.0 3.0 214 KB

License: MIT License

Shell 0.36% CMake 1.89% C++ 47.17% Java 21.73% JavaScript 3.55% TypeScript 4.74% Swift 0.18% Ruby 6.02% C 0.25% Objective-C 8.04% Objective-C++ 6.08%
javascript react-native

react-native-random-values-jsi-helper's Introduction

react-native-random-values-jsi-helper

React Native polyfill for crypto.getRandomValues. Used in libraries like uuid.

Installation

React Native 0.71.0 or higher:

yarn add react-native-random-values-jsi-helper
npx pod-install

React Native < 0.71:

yarn add [email protected]
npx pod-install

Usage

Import react-native-random-values-jsi-helper in your index.js file.

//index.js
import "react-native-random-values-jsi-helper";

You can now use the uuid package in your React Native app.

Performance

This module is written in C++ JSI.

Basically there is no over the bridge traffic overhead and no serialization/deserialization since the random arrays are generated on native side.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Acknowledgements

@mrousavy

@expo

Other projects

react-native-get-random-values

react-native-random-values-jsi-helper's People

Contributors

mateioprea avatar mmmoussa avatar mrousavy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-random-values-jsi-helper's Issues

[RN 0.71.0 build error] Expected directory '.../node_modules/react-native/android' to contain exactly one file, however, it contains no files

Hey there, thanks a lot for all the work on this ๐Ÿ™

I came across the following when I updated a project to 0.71.0 when building android:

* Where:
Build file '.../node_modules/react-native-random-values-jsi-helper/android/build.gradle' line: 172

* What went wrong:
A problem occurred evaluating project ':react-native-random-values-jsi-helper'.
> Expected directory '.../node_modules/react-native/android' to contain exactly one file, however, it contains no files.

seems to be related to react-native-community/discussions-and-proposals#508

also, they added this to react-native/android/README.md

Screenshot 2023-01-19 at 05 49 33

I tried to fix it, but then came across another issue related to CMakeLists.txt,
[CMake Error: The following variables are used in this project, but they are set to NOTFOUND] for REACT_NATIVE_JNI_LIB and JSI_LIB

probably was trying the wrong thing. ๐Ÿ˜„

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.