If I am rendering 100 items in React that are triggered to re-render on resize using ResizeObserver, is it possible the users resizing actions will cause state updates in the middle of those 100 renders (say after 30 have rendered, but before 70)? Or can I assume that all React component renders will happen together before ‘other things’ get a chance to interfere?
Similarly, if those 100 items have useEffect
, can I expect all those useEffects
will similarly run in sequence, without the possibility for the ResizeObserver being run in the middle? If so, what about between when the render functions have completed and useEffects
are run – guessing events related to resize could occur there?