$(div).toggleClass('active').fadeIn(500);
You used to call $(div).toggleClass('active') in ten places, but now you setActive(!active) instead, and have one place that says:
<div className={active ? 'active' : null} />
Cool.
<FadeIn delay={500}>
<div className={active ? 'active' : null} />
</FadeIn>
<Suspense timeoutMs={500} fallback={<Spinner />}>
<Thing />
</Suspense>
It seemed “declarative” that Suspense would specify how long it’s willing to “pause the world” before showing the fallback.
If a button that started the transition has some inline indicator, it’s ok to “pause the world”. But maybe there isn’t one.