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

fix(vanilla): avoid re-computing unmounted derived atoms in an edge case #2197

Merged
merged 3 commits into from
Oct 23, 2023
Merged

fix(vanilla): avoid re-computing unmounted derived atoms in an edge case #2197

merged 3 commits into from
Oct 23, 2023

Conversation

eryue0220
Copy link
Contributor

Related Issues or Discussions

Fixes #2168

Summary

Check List

  • [ x] yarn run prettier for formatting code and docs

@vercel
Copy link

vercel bot commented Oct 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jotai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2023 0:57am

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 19, 2023

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.

Latest deployment of this branch, based on commit 123599a:

Sandbox Source
React Configuration
React TypeScript Configuration
React Browserify Configuration
React Snowpack Configuration
Next.js Configuration
Next.js with custom Babel config Configuration
React with custom Babel config Configuration
competent-microservice-kmffmq Issue #2168

@dai-shi
Copy link
Member

dai-shi commented Oct 22, 2023

Let me work on this, as it might be a bit tricky.

@dai-shi
Copy link
Member

dai-shi commented Oct 22, 2023

a868c65 should pass the test, but it feels like reverting v2.3.0 change #2029.
I think it was the intention of v2.3.0 to accept this behavior.
I think it should be work around in jotai-recoil.

@eryue0220 huge apologies. I think it was my oversight.

@dai-shi
Copy link
Member

dai-shi commented Oct 22, 2023

On second thought,
#2168 (comment)
I will probably merge this. Give me some time to think about it.

@dai-shi dai-shi changed the title [WIP] fix: store bug fix(vanilla): avoid re-computing unmounted derived atoms in an edge case Oct 22, 2023
@dai-shi dai-shi marked this pull request as ready for review October 22, 2023 13:56
@dai-shi dai-shi added this to the v2.5.0 milestone Oct 23, 2023
Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think it's good to go. The code looks a bit unfortunate though.

@dai-shi dai-shi merged commit 4cd3564 into pmndrs:main Oct 23, 2023
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jotai-recoil issue since 2.3.0+
2 participants