React · Middle · Question 23 of 75

What does useTransition do?

Explanation

const [isPending, startTransition] = useTransition(); updates inside startTransition can be interrupted by more urgent ones. For example, switching to a heavy tab doesn't block the UI, and isPending lets you show an indicator. It has nothing to do with CSS animations.

Further reading

Problem with a question

React · Middle · question 23

Test yourself

Take the React · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz