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

Can't use with reducer #16

Closed
ImSingee opened this issue Dec 14, 2023 · 5 comments · Fixed by #20
Closed

Can't use with reducer #16

ImSingee opened this issue Dec 14, 2023 · 5 comments · Fixed by #20

Comments

@ImSingee
Copy link

ImSingee commented Dec 14, 2023

If used with reducer, the changes in the inner scope won't affect the outer.

Re-Produce: https://codesandbox.io/p/sandbox/zealous-framework-jnlrvf

(Count should be in sync, but not)

@dai-shi
Copy link
Member

dai-shi commented Dec 15, 2023

Thanks for reporting. Hmm, your code looks okay.
Are you sure if this issue is only with atomWithReducer? Using atom doesn't cause it?

@ImSingee
Copy link
Author

@dai-shi Yes I’m sure there’s not problem with pure atom

@dai-shi
Copy link
Member

dai-shi commented Dec 15, 2023

@yf-yang do you notice something?

@dai-shi
Copy link
Member

dai-shi commented Dec 29, 2023

I actually don't understand where is the bug. It would be nice if we could find it. I hope to try it.

@dai-shi
Copy link
Member

dai-shi commented Jan 19, 2024

My hope was pmndrs/jotai#2351 would fix completely, but there still seems to be an issue in jotai-scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants