partial hydration with useHydrateAtom #2603
Answered
by
dai-shi
aryankarim
asked this question in
Q&A
-
Hello guys, My atom store is too big, and I want to be able to partially update an atom upon hydration like so: useHydrateAtoms([[bigObjectAtom,{
key1:{...lotsOfStuff},
key2:{...lotsOfStuff},
key3:{
key4: 'I wanna update only this key',
...lotsOfStuff
}
}]])
|
Beta Was this translation helpful? Give feedback.
Answered by
dai-shi
Jun 13, 2024
Replies: 1 comment 5 replies
-
I think you need to separate the atom into smaller atoms. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hm, so is it a DX issue? I'd create a function to initialize the atom value.
Sounds like it's more Jotai way.