Question · JavaScript and React course · Module 9: Modern React Hooks
useDeferredValue vs useTransition
When is it better to use useDeferredValue instead of useTransition?
Answer options
- When we need information about the isPending state of an ongoing transition
- When we want to manually control when to start the transition using startTransition
- When we don't have control over the state update, e.g., the value comes from props or an external hook
- useDeferredValue and useTransition are identical and always interchangeable
You can check the correct answer by solving this task in the CodeWorlds game.