Improve Suspense loading states with useTransition
lessonDuration 6m 22s
This video uses an experimental API that has been changed. `useTransition` no longer accepts a `SUSPENSE_CONFIG`. [Learn more](https://github.com/facebook/react/pull/19703#issuecomment-683165346). React Suspense with Concurrent mode comes with a default optimization that is optimistic in that it waits a tiny bit for your suspending promise to resolve before making any DOM updates. But this can make the app feel unresponsive for some use cases. The experimental useTransition hook from React gives us more fine-grained control over the timing as well as the ability to show a pending state. Let's try that out here.