Question regarding the use of useAtom. #2510
Unanswered
steve-ds-choi
asked this question in
Bug report
Replies: 1 comment 1 reply
-
If you wrap |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am currently learning jotai. While creating an example, I found a potential error.
When switching from "Page 2", "Page 3" to "Page 1" as per the sample,
the value in the console.log is being called twice.
log ---
Menu: page1
App: page1
page1:0 -> Okay!
page1:0 -> Error?
It seems that the console.log is called once when Page 1 is constructed, which is normal.
Then, it seems to be called again due to the useAtom in Page1(), which seems to be an error.
(The event should not occur because counterAtom is already 0.)
Is there a solution for this?
Or is this a bug?
The "<React.StrictMode>" is in a disabled state.
Sample Code - App.js
Beta Was this translation helpful? Give feedback.
All reactions