Read time: 2 minutes We will see one of the features that the new version 18 of React brings. It's the useTransition hook. It is an essential feature since it allows us to prioritize React DOM updates over others, making the interface much more fluid.
You want to see the value of the input immediately every time you click.
However, we created a separate state for the list update. The latter is the one we use the hook with to prioritize the fluency of the input and not prioritize the state that would update the list that needs more processing to be rendered.
I am a little confused.
Isn't it same like if we use toggler state and show a spinner on its condition?
You want to see the value of the input immediately every time you click.
However, we created a separate state for the list update. The latter is the one we use the hook with to prioritize the fluency of the input and not prioritize the state that would update the list that needs more processing to be rendered.