In the index.js of the npm library react-native-randombytes there's a line: let RNRandomBytes = require('react-native').NativeModules.RNRandomBytes
. In the init()
method there's a code block wrapped in an if statement, if (RNRandomBytes.seed) { ... }
, and here's where the code is breaking, as RNRandomBytes
is undefined.
In debugging, I've found that NativeModules
has plenty of libraries associated with it, just not RNRandomBytes
. I'm in a Windows 10 environment, using node.js and react-native via rn-nodeify. I've gone through the react-native-crypto steps, including the react-native link
step. I'm guessing I'm missing something, is there a way to populate NativeModules
with RNRandomBytes
?