Learn React Hooks: useTransition - Simply Explained!

preview_player
Показать описание


In this video we will learn about React hooks, starting with useTransition. This powerful React hook will allow you to have interruptible state updates that you can configure to priorities some updates over others. This is an optimisation React hook which you will use to give users a better experience on your app. You will learn how to use the useTransition hook, how to start a transition with startTransition, and how to use the isPending flag to show some UI as the transition is happening.

In this new React world, hooks are here to stay, so it's best to learn them! In this tutorial I demonstrate the useTransition React hook, and I explain it very simply and in a way that is easy to understand. Enjoy!
Рекомендации по теме
Комментарии
Автор

I had to watch few parts of the video twice, but got it at the end. Amazing explanation, you got one more subscriber 👍

AnuragSingh-evqd
Автор

What you say "This is the last video you are ever going to watch", is actually 100% true. Just amazing explanation 👌🏻

sumitdubey
Автор

Beautiful. I didn't think you could have such a refined control of rendering by using hooks like this.

jacobwwarner
Автор

Cool, now I understand useTransition and I won't need to look at other videos and solutions for this.
Great explanation.

prakashbanjade
Автор

I really don't have to go to another video for this topic ever again 👏🏻

ankurparchani
Автор

I appreciate your work this helped a lot ❤❤. Your are the best who explain the hooks it is true the last video you need to watch ❣❣

adembenabdallah
Автор

That was very clear and helpful brother. Thanks, much appreciated 🙌👏

tusharghildiyal
Автор

Thank you for the explanation, really loved it 🥰

kofi
Автор

I will include this functionality to my page buttons

bronxandbrenx
Автор

awesome, thank you, these videos are really clear :)

literallyshane
Автор

Much simplified than the info from the docs :)

dev_odii
Автор

Amazing! I will refactor my code. Thanks so much!

irradev
Автор

Pretty clean explanation. Easy to understand. Thank you

mikewski
Автор

may be the better solution to wrap state updates from PostTab or Slow Post in setTransition instead of selectTab - just to differentiate high priority state-change v/s low priority state-change,

Bhannat
Автор

It'd be great if you can explain the caveats mentioned on the react docs as well 🙌🙏. TIA

subhashmalireddy
Автор

whoever has found this video on YouTube is lucky

abeercodes
Автор

React sends one rerender with currentState and isPending:true to component to tell it will start transition. Then it will rerender component with newState if during this rerender (probably slow) another update is raised, async rerender will be stopped

robertomolinasilvera
Автор

Thank you, the explanation in React documentation is really too general and unspecific, your video was very helpful.

MaksymCzech
Автор

so basically useTransition is just debouncing the function to be invoked a little bit later(in milliseconds)?

awekeningbro
Автор

does the useTransition hook work with react's userReducer just like it would be useState?

awekeningbro