(Testing) HydrateAtoms component resets atoms when using multiple initial values #2365
Replies: 2 comments 3 replies
-
Hi, thanks for reporting. |
Beta Was this translation helpful? Give feedback.
-
This is kind of limitation, but basically useHydrateAtoms works for primitive atoms. It's not useful for write-only atoms. |
Beta Was this translation helpful? Give feedback.
-
Summary
I'm facing an issue when using multiple initial values in the
useHydrateAtoms
hook .When I add two different atoms as initial values to the
useHydrateAtoms
hook, one atom is resetting the other, despite providing the initial value for each atom causing my test to break.Additionally, I encountered a TypeScript error related to sending different data types in a
new Map
.Link to reproduction
Link to Reproduction
Check List
Please do not ask questions in issues.
Please include a minimal reproduction.
Beta Was this translation helpful? Give feedback.
All reactions