atomWithProxy + multiple useSetAtom does not work #2582
Unanswered
simon-lund
asked this question in
Bug report
Replies: 1 comment 4 replies
|
I think you need to spread p args |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Setup
atomWithProxy.Problem
As seen in the example, I am using
useSetAtom(p => ...)on multiple pages, but that does not work as expected because the previous state (p) is empty.I toyed around with this:
useAtomValueoruseAtom)=> So I guess there is some desync internally where
useSetAtomdoes not read the state of the proxy.Code
All reactions