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

AtomEffect: calling setSelf with a promise triggers onSet #953

Closed
sseppola opened this issue Apr 3, 2021 · 2 comments
Closed

AtomEffect: calling setSelf with a promise triggers onSet #953

sseppola opened this issue Apr 3, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@sseppola
Copy link

sseppola commented Apr 3, 2021

The docs specify The callback is not called due to changes from this effect's own setSelf()

However, this does not apply when setSelf is called with a promise. I've made a CodeSandbox to demonstrate:
https://codesandbox.io/s/atom-effects-triggers-own-onset-gy1ty

@drarmstr drarmstr added the bug Something isn't working label Apr 14, 2021
@drarmstr drarmstr added the help wanted Extra attention is needed label Apr 19, 2021
@ShravanSunder
Copy link
Contributor

may be fixed with #979

@drarmstr drarmstr removed the help wanted Extra attention is needed label Apr 23, 2021
@drarmstr drarmstr self-assigned this Apr 23, 2021
@drarmstr
Copy link
Contributor

drarmstr commented Apr 23, 2021

@ShravanSunder - looks like a slightly different cause. But, I have a fix with #986

drarmstr added a commit to drarmstr/Recoil that referenced this issue Apr 23, 2021
Summary:
Fixes facebookexperimental#953

Avoid calling onSet() when setSelf() initializes with a Promise.

Differential Revision: D27975202

fbshipit-source-id: 2110733710d084b0b0a9f89334e6688467069993
drarmstr added a commit to drarmstr/Recoil that referenced this issue Apr 23, 2021
…bookexperimental#986)

Summary:
Pull Request resolved: facebookexperimental#986

Fixes facebookexperimental#953

Avoid calling onSet() when setSelf() initializes with a Promise.

Differential Revision: D27975202

fbshipit-source-id: 4560fb92fe549c31340092b351a85dc6ae400b52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants