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: no effect (follow up #38) #39

Merged
merged 15 commits into from
Jan 24, 2021
Merged

fix: no effect (follow up #38) #39

merged 15 commits into from
Jan 24, 2021

Conversation

dai-shi
Copy link
Owner

@dai-shi dai-shi commented Jan 23, 2021

Reported: pmndrs/jotai#275

The change I made in #38 was not optimal, which incurs extra commit phase.
We shouldn't use effect, but re-render in the render phase.

Also refactored a bit.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 23, 2021

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 958f530:

Sandbox Source
React Configuration
React Typescript Configuration

@dai-shi
Copy link
Owner Author

dai-shi commented Jan 24, 2021

Oh boy, I spent too much time on this. Thought there's a bug here, but the bug was in jotai. The final diff in this PR is straightforward.

@dai-shi dai-shi merged commit 9e9c977 into master Jan 24, 2021
@dai-shi dai-shi deleted the fix/no-effect branch January 24, 2021 13:46
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.

None yet

1 participant