Can I change an atom from another Atom-effects? #1785
-
It seems that I can't, for example if I have an atom Price, and I want to detect when it changes and set another atom with the percentage (%) variation, it seems to be easy from de effect of atom Price because I have the newValue and oldValue. I can do the same using react effect, of course, but I was thinking about performance, and I don't know if it will take the same. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Correct, atom effects are currently focused on syncing for the atom the particular atom they are attached to. For multi-atom syncing you can use React effects, as you point out. |
Beta Was this translation helpful? Give feedback.
Correct, atom effects are currently focused on syncing for the atom the particular atom they are attached to. For multi-atom syncing you can use React effects, as you point out.