Skip to content
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

Provide new value to onSet() handler when triggered by async default #1059

Closed

Conversation

drarmstr
Copy link
Contributor

@drarmstr drarmstr commented Jun 2, 2021

Summary:
When an atom effect's onSet() handler is triggered due to having a default which is an async Promise that resolves the handler should be able to get the proper new value instead of a DefaultValue placeholder.

This addresses customer-reported issue #1050

Differential Revision: D28850148

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jun 2, 2021
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D28850148

Summary:
When an atom effect's `onSet()` handler is triggered due to having a default which is an async `Promise` that resolves the handler should be able to get the proper new value instead of a `DefaultValue` placeholder.

This addresses customer-reported issue facebookexperimental#1050

Differential Revision: D28850148

fbshipit-source-id: 0f19d2179e7f3d522887550af32b87247f979f26
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D28850148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
2 participants