-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
fix(utils): make 'unwrap' and 'loadable' able to access async atom's resolved value immediately #2417
fix(utils): make 'unwrap' and 'loadable' able to access async atom's resolved value immediately #2417
Conversation
…d value immediately
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Preview in LiveCodesLatest commit: ed59ecc
See documentations for usage instructions. |
Preview in LiveCodesLatest commit: c6e4a55
See documentations for usage instructions. |
Thanks for the suggestion. Yeah, it depends on the internal promise behavior, but I think it's a good capability to add. |
No worries! I failed to notice the problem with separate bundles. Thanks for a fast response 🐸 |
Summary
In our project, we had the need to await on a secure store to load proper auth information before initializing the rest of the app, and as soon as that atom resolved, we had to check whether we were previously logged in, or logged out.
The same happens with the
loadable
utility. I managed to write a test for it and implement a fix, hope it does not stray to heavy into the 'experimental' promise usage, or does not break anything else unintentionally.Check List
yarn run prettier
for formatting code and docs