setState in an event or promise callback is fine, it’s setState in the effect body that is the absolute worst, especially in layout effects (which forces a sync render)

Comments