React Hooks Tutorial - 25 - useState vs useReducer

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

📱 Follow Codevolution

useState vs useReducer
Рекомендации по теме
Комментарии
Автор

I would say you are a way better tutor than 99% of the Udemy tutors out there with their paid tutorials. Thank God that you are blessed with such a talent in interpreting complex concepts and also the passionate and kind heart to share all your knowledge so selflessly!Can't even express how grateful and lucky I feel to find your Youtube channel.
Best wishes to you and your family! I Will definitely continue to support your own website whenever there is new content!

ericxu
Автор

great work. i binge watched this entire playlist.

wahoobeans
Автор

Whenever a question comes up to my mind you are already giving the answer.
Best tutor i found so far.

jgv
Автор

You are really beyond excellent at explaining complex stuff. Thank you very much.

rafik.arif.
Автор

You are really the best React teacher way better than all the ones on Udemy! Thank you so much for making this tutorial!

theresashen
Автор

Thank you so much for simplifying the useReducer hook and making it much easy to understand. i always thought it was so difficult but i am glad you proved me wrong

greatnwamadi
Автор

Excellent !! Hope i will also become like you some day !!

prnk
Автор

Hi sir, your tutorials are extremely good. Thank you very much!
Could you make series about the Authorization for ReactJs, please ❤

HaoLe-cmhg
Автор

Great work, i become fan of you, Thanks a lot for helping me understanding in a simpler way.

balakumars
Автор

Thank u for this awesome video and series

AbhishekKumar-mqtt
Автор

love this channel..god bless you my friend

ashishnayak
Автор

This video doesn't have subtitles :(
Why?
By the way, great job as always. This course is fire!

matteol
Автор

Thank you for the video.But for the 3 first ones, we can use "useState" by storing state into an object like const [{isLoading, isError, isIdle, data}, setState]=useState(()=>({isLoading:false, isError:false, isIdle:true, data:null})) to avoid a lot of transitions.And for update, using setState({...}).Also with React 18, the batch update feature will prevent from the transitions problem, and for the 3 first cases we can use useReducer or useState.For the 2 last once, when we combine all this with the context API, i think you are right but, there are also ways to use useState in a very effecient way.This is really an matter of opinion, experience and practice.English isn't my first language, so understand the mistkes.

christianlisangola
Автор

useReducer looks similar to the reducer in a redux application. So, useReducer is it used in a non-redux application ?

leg
Автор

when to use useReducer?
u said
useState -> number, boolean, string
useReducer-> array or object


but using useState (useEffect) v can fetch array/object too
then y to use useReducer?

manjunathjadhav
Автор

I still don't understand that why should I use any of these? Why can't I export my own object having state & behavior both & then import it to use in any component.

adilsheikh
Автор

Which is faster and performant while both works for us?
1. useState

2. useReducer

belqisshida
Автор

Bro create playlists about "React Helmet" for SEO purpose then your channel get 1million subscriber beleive me...

rahulvirat
Автор

Local state Vs Global State. How a state can be local, it is always Global right? If i am defining const [state, setState] = useState('') this state is always global. Am i correct or missing something?

pankajjoshi
Автор

can someone please brief the meaning of related state transitions and business logic? I will appreciate it.

liewweijun