You pass a function to startTransition. Calling setTab before passing a function would schedule the update outside the transition.
Question 15 of 20 in useTransition Quiz