I’m working on an app at the moment that is going to use “react-native-secure-randombytes” and I assumed it would work with react-native and Expo.
So far I’ve installed the package using npm install --save react-native-secure-randombytes and I’ve also run rnpm link.
I’m currently getting the error “undefined is not an object(evaluating ‘RNRandomBytes.randomBytes’)”. I can see the .h and .m files in the directory of the npm module, but I’m not able to use it. If anyone can help with this I’d be really grateful.
unfortunately, this library adds native code into a project and so you can’t just npm install it and use it. you’ll need to detach your expo project or find another way to do it with just JS.
You can make a feature request for adding this module or similar into Expo here: