-
It seems if the parent has async atom Repro: (react 18.0.0) I also got another similar huge amount of re-render when mounting/unmounting component, Repro: (react 18.2.0) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Thanks for reporting.
I think it is because you create a new jotai store within suspense, and for initial render, react will re-mount the entire tree under suspense. So, this behavior is somewhat reproducible with useState, I suppose. Didn't look into very closely, so I might be missing something. |
Beta Was this translation helpful? Give feedback.
Thanks for reporting.
I think it is because you create a new jotai store within suspense, and for initial render, react will re-mount the entire tree under suspense. So, this behavior is somewhat reproducible with useState, I suppose.
Didn't look into very closely, so I might be missing something.