-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[React Native] Operations hang waiting for sodium.ready #33
Comments
For me this seemed to be caused by calling Etebase functions like Hope this helps someone else. Maybe some note in the docs about how to work with these functions in React hooks would be good. |
Is this in RN or react? Also, I know it's potentially not a useful comment, but you can try take a look at https://github.com/etesync/etesync-web/ for usage of all of these functions. Or if you prefer react-native (or tbh, react web too), you can just take a look at the (cleaner) https://github.com/etesync/etesync-notes |
@tasn This is in React Native. And yes, I'll take a look at the EteSync apps to get an idea how to do things properly. Thanks for the suggestion! |
With pleasure! |
etebase-js/src/Crypto.ts
Line 25 in a329037
This one is tricky and I don't have time to make a project that reproduces it, but wanted to note it here just in case anyone has some bright ideas.
When calling
login
orsignup
from the top App component of my app, everything works fine, but when I call them from components further down the tree, theready
function inCrypto.ts
returns false or never returns. If I comment out all theready
checks, everything works fine.I'm not sure of an elegant way to handle this and if there would be downstream effects to removing this call for React Native. Or possibly this is a problem with my own setup. Although I did remove all but three components in my component tree in order to find this function as the culprit. So it was as barebones as my app could get but of course there are other libraries being loaded that may be conflicting somehow.
The text was updated successfully, but these errors were encountered: