React Redux using Hooks ( NEW useSelectore & useDispatch )

Поділитися
Вставка

КОМЕНТАРІ • 175

  • @arcan762
    @arcan762 2 роки тому +1

    1 minute of content delivered in 12 minutes

  • @mendesdotdev
    @mendesdotdev 4 роки тому +3

    Great Video! I was almost giving up on Redux because of the boilerplate and setup, but useSelector and useDispatch made my life a lot easier. Excellent explanation!!!

  • @stonecoldcold2941
    @stonecoldcold2941 4 роки тому +1

    What extensions are you using for that arror function that makes the arrow longer and also, fonts are looking awesome and for dark background too.

  • @aashayamballi
    @aashayamballi 5 років тому +67

    Please do a tutorial on redux thunk with hooks.

    • @portercooper3121
      @portercooper3121 3 роки тому

      I know im randomly asking but does someone know of a way to log back into an instagram account..?
      I was dumb forgot the account password. I would appreciate any help you can offer me.

    • @geraldjace1246
      @geraldjace1246 3 роки тому

      @Porter Cooper instablaster ;)

    • @portercooper3121
      @portercooper3121 3 роки тому

      @Gerald Jace Thanks for your reply. I got to the site thru google and im trying it out now.
      Takes a while so I will reply here later when my account password hopefully is recovered.

    • @portercooper3121
      @portercooper3121 3 роки тому

      @Gerald Jace It worked and I now got access to my account again. Im so happy:D
      Thanks so much, you saved my account!

    • @geraldjace1246
      @geraldjace1246 3 роки тому

      @Porter Cooper You are welcome xD

  • @petridev77
    @petridev77 3 роки тому

    man you saved my life with these hooks. so clean and easy. watched a ton of stupid tutorials till i reached this one and its so easy to understand. thank you brother i subscribe now. have a great life! petri from romania.

    • @Techsithtube
      @Techsithtube  3 роки тому +1

      Glad I could help Petri. Thanks for watching!

  • @jesuskraisnik
    @jesuskraisnik 5 років тому +2

    Thank you for every of your video, you always make it simplified, you make it easier to swallow for the begginers.

    • @Techsithtube
      @Techsithtube  5 років тому

      I am glad it helped . Thanks for the comment Bojan. :)

    • @mohak1990y
      @mohak1990y 3 роки тому

      Where are actions gone?????

  • @jacostaperu
    @jacostaperu 4 роки тому +8

    great Tutorial, simple and easy to understand

  • @nayakashu
    @nayakashu 4 роки тому +3

    @techsith All your tutorials, be it HTML, CSS, JS, and now React have been very concise and straight to the point and informative. That's what I like about your tutorials on UA-cam. And that keeps me frequenting to them time and again. Keep doing the good stuff which you are doing now.
    And, also I am obsessed with the ending background music. Can you share the source for the same? I tried Shazam but it shows "No results".
    The music sounds very pumping and full of adrenaline.

    • @Techsithtube
      @Techsithtube  4 роки тому +2

      Ashutosh, the end music is actually from youtube's own music library, the name of the track is "still standing". Thanks for watching.

  • @doubledouble3454
    @doubledouble3454 5 років тому +1

    thats great i hardly find that great informative videos abour new apis. Thanks !

  • @jasonwelsh417
    @jasonwelsh417 4 роки тому

    I just refactored one of my small apps from using useReducer and useState to usung Redux with this and it was a breeze. Thanks Techsith!

  • @MrBabakjaberi
    @MrBabakjaberi 2 роки тому

    Simple and effective description. Respect everyone time. Thanks!

  • @shivanisharma6647
    @shivanisharma6647 4 роки тому

    That's was really a very nice explaination n the thing i liked the most when you cleared about useReducer , that it's not a redux thing. This was the thing I wanted to clear out.

  • @EatTheBlocks
    @EatTheBlocks 5 років тому +1

    Not sure I really like useDispatch({type: ACTION_NAME}); Now need to import ACTION_NAME and also know the keys that need to be given to the object. WOuld be better if we could combine useDispatch with action creators somehow.

  • @samshams1082
    @samshams1082 3 роки тому

    what a great toturial just in 12 min,Thanks man you gave me wings to fly by redux in a short way

  • @RNISjpsharma
    @RNISjpsharma 3 роки тому

    Very clean-lucid react-redux sofar. Thanks.

  • @michael.ahearn
    @michael.ahearn 3 роки тому

    Thank you for doing this tutorial. It's very easy to understand.

  • @MrKaremnour
    @MrKaremnour 4 роки тому +1

    To the point and clear,, u saved my time

    • @Techsithtube
      @Techsithtube  4 роки тому

      Good to hear that it helped. Keep up the good work Kareem.

  • @sawyerrken8112
    @sawyerrken8112 5 років тому

    Awesome tutorial... I think I'm beginning to catch up... lol. Its the first techsith tutorial I walked into, already knowing everything that would be covered (because I have already started using these hooks in ongoing projects). Thank you Techsith

  • @sirNemanjapro
    @sirNemanjapro 5 років тому +38

    None, Dan Abramov has declared darkness a new standard.

    • @xerotolerant
      @xerotolerant 5 років тому +2

      Abramov has spoken.

    • @perc-ai
      @perc-ai 5 років тому +2

      Lord Abramov

    • @Techsithtube
      @Techsithtube  5 років тому +2

      Sith agrees that Dan has moved to the dark side. :)

    • @jensenraylight8011
      @jensenraylight8011 5 років тому

      @@internet4543 they mixed it,
      they mix the container and component

    • @devolee8302
      @devolee8302 4 роки тому

      @@internet4543 lol

  • @prographics2788
    @prographics2788 2 роки тому +1

    what's the music at the end please ?

  • @haidrenamalia7167
    @haidrenamalia7167 5 років тому +1

    super easy to comprehend, kudos for that!

    • @Techsithtube
      @Techsithtube  5 років тому

      Glad you got it Haidren. Keep on learning

  • @chips-n-salsa
    @chips-n-salsa 3 роки тому

    great explanation..any cons of doing it this way compared to the older way?

  • @jasonwelsh417
    @jasonwelsh417 4 роки тому +1

    Awesome tutorial as always

  • @franzgm
    @franzgm 4 роки тому +1

    tahnk youi very much, it was a nice explanation of a minimal redux :)

  • @Dirtyratsdotwebs
    @Dirtyratsdotwebs 5 років тому +3

    I stayed for the joke, I was disappointed, I learnt a lot on the way to the joke, thus I am satisfied, great video thank you!

  • @razzsawhoney2818
    @razzsawhoney2818 4 роки тому +1

    One of the most common thing which most of the developers lack is the habit of not reading the documentation provided by the concerned tech... And the youtubers take advantage of that, they do read the docs well and present the same in their videos and we simply applause them... And by the way I am not an exception, I too do the same mistake😂😂🤣

  • @vijayabhaskarkavuri6053
    @vijayabhaskarkavuri6053 5 років тому +1

    Thanks for this video, when I worked with redux previously I felt like what the hell is this now too cool.

  • @peynao
    @peynao 3 роки тому

    Very useful. I've been few days reading the Official manuals from Redux and I couldn't see if they useDispatch and useSelect actually replace connect functionality or not.

  • @jesuscama5354
    @jesuscama5354 4 роки тому

    Many thanks, clear and concise !

  • @power-tools
    @power-tools 4 роки тому +1

    Thank you! but what about actions?

  • @HimanshuSingh_92
    @HimanshuSingh_92 4 роки тому

    Awesome video sir.
    Do we still have combineReducer in newer versions of React?

  • @Loficomposer
    @Loficomposer 5 років тому +1

    thank you man that was a nice intro to react hooks do more we are waiting for more

  • @yash_pinnaka
    @yash_pinnaka 5 років тому

    Great video ! Covering all the necessary basics !!

  • @tasawarhussain2063
    @tasawarhussain2063 4 роки тому

    Simple and to the point. 👍

  • @jaybee4976
    @jaybee4976 3 роки тому

    THANKS MAN YOU ARE A KING

  • @amneetsandhu7734
    @amneetsandhu7734 3 роки тому

    So easy to understand. thanks!

  • @chikechris4411
    @chikechris4411 5 років тому +1

    Wow. This is great. nice and simple

  • @avivshvitzky173
    @avivshvitzky173 5 років тому +1

    These are amazing updates!
    Thank you for the video!

  • @phpmysql2007
    @phpmysql2007 3 роки тому +1

    wow this is a lot easier than the old way of doing redux!

  • @lentsd
    @lentsd 3 роки тому +1

    Nice explaining and good joke. Thanks!

  • @adambennun9174
    @adambennun9174 3 роки тому

    thanks!! great, clear understandable explanation

  • @tegaogheneovo5881
    @tegaogheneovo5881 3 роки тому

    Love that confidence on da thumbnail..migos which way hook way

  • @paramjeetsingh7110
    @paramjeetsingh7110 3 роки тому

    Very well explained ... thank you

  • @pragneshrht
    @pragneshrht 3 роки тому

    My man you are the best. Thanks a bunch!

  • @aashayamballi
    @aashayamballi 5 років тому +2

    Thank you 😄

  • @egorpobylets6597
    @egorpobylets6597 5 років тому +1

    Thank you for this video

  • @karuneshkaimal
    @karuneshkaimal 4 роки тому

    how would componentDidMount work here , lets say you want to do a get request at the time of rendering ?

  • @kazaakas
    @kazaakas 5 років тому +1

    I love hooks, but I don't think I will be using this for my functional components. I can't imagine any way to make this as nicely unittestable as with `connect`. If you separately export the non-connected component for unittesting, you need can super conveniently inject whatever you want without needing mocking/context etc.

    • @Techsithtube
      @Techsithtube  5 років тому

      Yes, that is an important question. I dont think its that hard to mock any of this as they are bunch of imports and functions. If you know react-testing-library some nice solutions for that.

  • @shubhodeeppaul4223
    @shubhodeeppaul4223 4 роки тому

    please tell which theme you are using

  • @mhamzarajput
    @mhamzarajput 3 роки тому

    perfect thanks, man. I got what I'm looking for.

  • @lone-warrior-13
    @lone-warrior-13 5 років тому +1

    Great tutorial thanks

  • @suganya32
    @suganya32 4 роки тому

    Thank you. It's really useful.

  • @certifiedd__stayy
    @certifiedd__stayy 4 роки тому

    very nice.. thanks for sharing

  • @014anirban
    @014anirban 3 роки тому

    here we don't need to use connect method right ?

  • @hbela1000
    @hbela1000 5 років тому +1

    techSith is just pro.thx.

  • @kevgits
    @kevgits 3 роки тому

    How do you update a multiple field state like "first name, last name, and amount using redux?

  • @psued0285
    @psued0285 5 років тому +23

    the joke is so funny that I forgot to laugh, lmao

  • @ailengrimaldi5750
    @ailengrimaldi5750 4 роки тому

    Thanks it helped me a lot

  • @GuitarreroDaniel
    @GuitarreroDaniel 3 роки тому

    This was so amazing, thank you very much for this!

  • @aarondz789
    @aarondz789 4 роки тому

    Hi,can i ask you about your arrow? => .... is it ⇒? How to achieve?

  • @netanelvaknin579
    @netanelvaknin579 4 роки тому

    Thank you for that great video. You helped me a lot. Keep going and make more good videos in the future :)
    Good luck!

  • @Softkkey
    @Softkkey 4 роки тому

    I think for those who are using Apollo and Graphql can manage this. But I see Face book and Airbnb use redux yet. I think it's still useful for very long application s with hundred of thousand of components. But I don't know if I really need to catch global state such as a login or sign-up or just still using higher order component with Apollo to pass the token .

  • @asimbilal47
    @asimbilal47 5 років тому +1

    great tutorial !!!!!!!!!! very helpful.

  • @rahulkhokhariya2686
    @rahulkhokhariya2686 4 роки тому

    Why does lost focus after type any char in InputText ? (I used hook only not with redux)

  • @warsame2245
    @warsame2245 5 років тому +2

    hey techsith, are you ever gonna have a react course on UDEMY?

    • @Techsithtube
      @Techsithtube  5 років тому

      I am working on it . most probably will release in JUly . I will announce it.

    • @warsame2245
      @warsame2245 5 років тому

      @@Techsithtube If you can include the interview questions too, I think it will make your course stand out, out of all the react courses.

  • @KDcoo
    @KDcoo 5 років тому

    Thank you very helpful and straight forward!

  • @jensenraylight8011
    @jensenraylight8011 5 років тому

    i have a question, why you didn't define action?
    all other document, they still define action in action.js
    , but in your video, i didn't see any action, only the reducer
    why?

    • @Techsithtube
      @Techsithtube  5 років тому

      In this video my objective is to simply show the new hooks not the build full fledge project with proper structure for that you can checkout my redux series.

  • @herbertk9266
    @herbertk9266 5 років тому +1

    Thanks alot i like it

  • @centinela90
    @centinela90 3 роки тому

    Thank you very much for your tutorial, it helped me! :D

  • @udaykyastu2784
    @udaykyastu2784 2 роки тому

    Nice video. If possible can you make one more video with real time example by using same concept

  • @AK-me3tl
    @AK-me3tl 5 років тому +1

    Change the light bulb? Are we mutating the light bulb directly? How dare you. Of course we build a new light fitting next to it, then destroy the old one ;)

  • @nachoggz
    @nachoggz 4 роки тому

    Hi guys, my code is not rendering the value from redux, but on the redux console Im seeing that the value. Do you know why?

  • @meganadams
    @meganadams 4 роки тому +1

    Legendary. Cheers!

  • @rogerpumalexander
    @rogerpumalexander 4 роки тому

    never knew who you were until now and i immediately subscribed solely based on your name.

  • @pokerspace_pro
    @pokerspace_pro 4 роки тому

    simple and great!

  • @valaydesai1120
    @valaydesai1120 5 років тому +1

    Do we need Redux when we now have Context API with useContext and useReducer hooks ?

    • @Techsithtube
      @Techsithtube  5 років тому

      Yes with useReducer you cant use async actions like redux thunk . in future react may introduce it.

    • @natqe4049
      @natqe4049 5 років тому

      No you don't need redux. react have all ever you need, and in better approach.

    • @leodriesch
      @leodriesch 5 років тому

      I would say for smaller applications useContext and useReducer will be enough. When your applications grow in size, Redux tooling like redux-logger and redux-thunk come in handy for debugging and cleaner code, so I would stick to Redux for bigger applications.

  • @denisotim7640
    @denisotim7640 3 роки тому

    I didn't mind the joke. great video!

    • @Techsithtube
      @Techsithtube  3 роки тому +1

      Glad you enjoyed it! Thanks for watching!

  • @josemiguelsanchez9124
    @josemiguelsanchez9124 4 роки тому

    Excellent video

  • @davidclews9012
    @davidclews9012 2 роки тому

    only just started using react hooks, seems to be going backwards from class components

  • @debanjanbasu18
    @debanjanbasu18 4 роки тому

    That was an awsm explaination.

  • @Gogosmo
    @Gogosmo 5 років тому +1

    Two, one senior with the state and function and one junior with a changeLightBulp( ) callback.

  • @pedrosanchezroca181
    @pedrosanchezroca181 4 роки тому

    getting totally confused with, in one hand useSelector+useDispatch and on the other hand useReducer+useContext…….are they the same? when to use one pair or the other? does it really matter when to use one pair or the other??

    • @Techsithtube
      @Techsithtube  4 роки тому

      Pedro, useSelector+useDispatch are actually redux inbuilt hooks. as I explained in the video. useReducer + useContext are react inbuilt hooks they are sort of alternative to redux. It doesnt really matter which on you use.

    • @pedrosanchezroca181
      @pedrosanchezroca181 4 роки тому

      @@Techsithtube Thanks you so much! good to know, it is more clear now!

  • @wilcas5349
    @wilcas5349 4 роки тому

    What's about the npm install redux@next? What does it mean? Why not just npm install redux?

    • @Techsithtube
      @Techsithtube  4 роки тому

      redux@next basically installs a beta version npm install installs a latest working version.

  • @topsilog2236
    @topsilog2236 4 роки тому

    Im a front wnd intern and we are currently working on a project where we use hooks and redux
    .i hope we can use this one ..can we mix this with midwares like saga or thunk?

    • @Techsithtube
      @Techsithtube  4 роки тому +1

      yes you can mix the new hooks with saga and thunk it should work seamlessly.

  • @sketchwarers1362
    @sketchwarers1362 3 роки тому

    I tried the same method in react native app but it gives an error something like this : "undefined is not an object eveluating 'state.counter' " please help me

    • @Techsithtube
      @Techsithtube  3 роки тому

      Can you share your code.

    • @sketchwarers1362
      @sketchwarers1362 3 роки тому

      I actually saw your reply late so, sorry for that. and I found the reason for the error is that I was not using the default case which returns the state itself like this
      " default:
      return (state)"
      in switch statement located in my root reducer js file. After solving this issue it worked. that was actually my own problem, and not the problem caused by watching this tutorial. So sorry for that.

  • @petridev77
    @petridev77 3 роки тому

    can you make a tutorial on how to fetch api data and have it in state, list them and add them to cart, remove, see product info? the simplest way. thanks bro!

  • @chandrashekarshetty1039
    @chandrashekarshetty1039 3 роки тому

    Thanks 😊

  • @ravimone1
    @ravimone1 4 роки тому

    Hello Sir, you are awesome, thanks for this wonderful explanation, I have few doubts regarding hooks
    1. Can we use some hooks(useState) in a class based component?,
    2. Since we have this useSelector & useDispatch, then why there is again a new thing useReducer, Is there a advantage over one another.
    3. Since we can acheve the store data using hooks, I beleive, we can develop the application completely using Hooks (useState, useEffects, ...), Then No need for Presentational & Functional pattern ? Anyone agree.
    4. In the example video, while calling dispatch, you called using arrow functions
    onClick={()=>{ dispatch(....)}}, But for performace reasons this is better `onClick={dispatch.bind(this, { type: "INCREMENT" }`

  • @fdc_8507
    @fdc_8507 5 років тому +1

    wellcome back to React :)

  • @nofacedude9959
    @nofacedude9959 4 роки тому

    goddamn thank u for this helpful video :*

  • @arunkukkudapu1892
    @arunkukkudapu1892 5 років тому +1

    now no need of using connect(react-redux)...?

  • @subbumani7784
    @subbumani7784 4 роки тому

    thanks bro

  • @Geedimensions
    @Geedimensions 5 років тому

    When i add useDispatch() to a child component as well, I get an error. "React has detected a change in the order of Hooks called by App. "

  • @sawyerrken8112
    @sawyerrken8112 5 років тому

    How many React'ers does it take to screw a light bulb? ...................there was no light all this while?

  • @laurelineparis5407
    @laurelineparis5407 4 роки тому

    Hi there, as usual your videos are great, time saving, really really understandable not like plenty of articles I could red till now.
    You didn't use action and action creators, wouldn't be interesting too ?
    thanks for everything again, Sensei Sama

  • @zlackbiro
    @zlackbiro 4 роки тому

    This is almost the same as Recoil setup. Dispatch as a switch. LoL... just like in useReducer. All inventors doesnt reinventing the wheel. I think i can build my version of state managment.

  • @sunilkumar9560
    @sunilkumar9560 4 роки тому

    appreciate all your videos, can we make vdo on shallowequal thing in react ? it would be helpful.

  • @matc8085
    @matc8085 4 роки тому

    no link to the repo?

  • @saskirakosyan5268
    @saskirakosyan5268 4 роки тому +1

    Thanks )))

  • @parasarora5869
    @parasarora5869 5 років тому

    how to use redux thunk with hooks now ?