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(core): handle edge cases, not to mount dependency atoms if the atom is not mounted #961

Merged
merged 3 commits into from
Jan 18, 2022

Conversation

xbaun
Copy link
Contributor

@xbaun xbaun commented Jan 13, 2022

fix #942.

(edit by @dai-shi) the solution seems a little bit hacky and may break other use cases. we look for more cases and tests.

@vercel
Copy link

vercel bot commented Jan 13, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/jotai/9bySEfzHAYHdFk1gig6iBdvRYiQJ
✅ Preview: https://jotai-git-fork-xbaun-fix-add-test-case-942-pmndrs.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 13, 2022

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 8cd0abe:

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

@dai-shi dai-shi changed the title fix: add test case for #942 fix(core): handle edge cases, not to mount dependency atoms if the atom is not mounted Jan 16, 2022
@dai-shi dai-shi added this to the v1.5.3 milestone Jan 16, 2022
@dai-shi dai-shi merged commit dc6851d into pmndrs:main Jan 18, 2022
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.

Mount and unmount functions are not paired if an atom is only used in write
2 participants