QuizNot attempted
What useTransition returns
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
[isPending, startTransition]— a boolean pending flag and a function to mark updates as non-urgent
useTransition()returns an array[isPending, startTransition]: a boolean that is true while a transition is rendering, and a function that marks the updates inside it as non-urgent.- Not reversed: the flag comes first.
- Not an object: like
useState, it returns a tuple. - Not isPending only:
startTransitionis in the tuple (a standalonestartTransitionexport also exists, but it has no pending flag).