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 useTransition
s returns. By convention, it's assigned to a variable named isPending
.