-
https://codesandbox.io/p/sandbox/great-scott-x28y5r Say there is an atom that depends on multiple atoms. When one of those dependencies are updated, its perfectly fine. However, when I need to update multiple atom "simultaneously", there exists an intermediate state where the downstream "get" is triggered with only one dependency atom is updated and the other is remained the same. I know current behavior does not affect rendering. The use case is that I'd like to add some assertion in the dependent atom, but when two dependencies are updated simultaneously, there exists an intermediate state that breaks the assertion while the beginning/ending state still satisfy the assertion. So, are there some api to achieve that? If not it's OK, I'll try to figure out other solutions. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
Related: #2827 |
Beta Was this translation helpful? Give feedback.
-
Hey @yf-yang, haven't heard from you for a while. How's everything? Would you still be able to help jotai-scope project? |
Beta Was this translation helpful? Give feedback.
-
Batch functionality added in #2827 |
Beta Was this translation helpful? Give feedback.
It's our design decision not to introduce
batch
function. If we were to add it, it should be a third-party library in https://github.com/jotaijs.