antelle / argon2-browser

Argon2 library compiled for browser runtime
https://antelle.net/argon2-browser
MIT License
367 stars 79 forks source link

Thoughts on use in React Native? #19

Closed Nantris closed 5 years ago

Nantris commented 5 years ago

This is beyond the scope of this library, and my question itself is pretty terrible due to not knowing where even to begin with debugging, but I figure that it doesn't hurt to ask if you have any thoughts on how to use argon2-browser in a React Native environment.

Importing and requiring the module in that environment just produce a const with a value of undefined.

antelle commented 5 years ago

I don't know, never worked with react native. I would not use this library in react native, where you can export the function from C++: https://facebook.github.io/react-native/docs/native-modules-ios - it should be much faster compared to wasm.

Nantris commented 5 years ago

@antelle that's pretty much what I figured, but never hurts to ask. I agree it would be much faster to use native modules, but you can't use them with Expo. Thanks so much for everything!