TLDR Web Dev · ARTICLES & TUTORIALS
MORE THAN YOU NEED TO KNOW ABOUT REACTDOM.FLUSHSYNC
Summary from the TLDR Web Dev newsletter
ReactDOM.flushSync is a function that forces React to flush any pending work and update the DOM synchronously. This post is an in-depth look at what React does on updates and how flushSync can solve problems when React updates the UI later than you need it to. The article provides a good distillation of how React updates the DOM even if flushSync isn’t used immediately in a use case.