Quantcast
Channel: Batch set state for Recoil - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Johannes Klauß for Batch set state for Recoil

Recoil batches the state updates by default (this is also true for React state itself). If you don't want to batch the updates code wise, you could use the useRecoilCallback hook, something like...

View Article



Batch set state for Recoil

If I have to set states from multiple different atoms as part of some high level action user is taking, I want all subscribing components for any of the impacted atoms to be re-rendered only once when...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images