1. 11
    Display Loading States Conditionally with React.useTransition's isPending Boolean
    2m 45s

Display Loading States Conditionally with React.useTransition's isPending Boolean

Michael Chan
InstructorMichael Chan

Share this video with your friends

Send Tweet

It's a good practice to give users immediate feedback while asynchronous work is being completed.

useTransition returns a boolean we can use to conditionally render loading UI. This boolean is the second element in the array useTransitions returns. By convention, it's assigned to a variable named isPending.