React Redux using Hooks ( NEW useSelectore & useDispatch )
HTML-код
- Опубликовано: 9 июн 2019
- Redux and React-redux Hooks way simple state management example using create-react-app
#reactHooks #react-redux #useDispatch
Help the channel via patron and buying merchandise
* / techsith
* teespring.com/stores/techsith...
Follow me for technology updates
* / techsith
* / techsith
* / techsith1
* / 13677140
* / patelhemil
Help me translate this video.
* ruclips.net/user/timedtext_vide...
Note: use translate.google.com/ to translate this video to your language. Let me know once you do that so i can give you credit. Thank you in advance. Наука
1 minute of content delivered in 12 minutes
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!!!
These are amazing updates!
Thank you for the video!
thats great i hardly find that great informative videos abour new apis. Thanks !
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
great Tutorial, simple and easy to understand
Great video ! Covering all the necessary basics !!
Please do a tutorial on redux thunk with hooks.
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.
@Porter Cooper instablaster ;)
@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.
@Gerald Jace It worked and I now got access to my account again. Im so happy:D
Thanks so much, you saved my account!
@Porter Cooper You are welcome xD
Thank you for that great video. You helped me a lot. Keep going and make more good videos in the future :)
Good luck!
Simple and effective description. Respect everyone time. Thanks!
Thank you for doing this tutorial. It's very easy to understand.
Thank you for every of your video, you always make it simplified, you make it easier to swallow for the begginers.
I am glad it helped . Thanks for the comment Bojan. :)
Where are actions gone?????
thank you man that was a nice intro to react hooks do more we are waiting for more
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.
Many thanks, clear and concise !
THANKS MAN YOU ARE A KING
Thank you very helpful and straight forward!
Thank you very much for your tutorial, it helped me! :D
tahnk youi very much, it was a nice explanation of a minimal redux :)
Wow. This is great. nice and simple
Simple and to the point. 👍
Very well explained ... thank you
Very clean-lucid react-redux sofar. Thanks.
My man you are the best. Thanks a bunch!
So easy to understand. thanks!
what a great toturial just in 12 min,Thanks man you gave me wings to fly by redux in a short way
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!
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.
Glad I could help Petri. Thanks for watching!
Thank you for this video
This was so amazing, thank you very much for this!
You're so welcome!
Thank you. It's really useful.
To the point and clear,, u saved my time
Good to hear that it helped. Keep up the good work Kareem.
thanks!! great, clear understandable explanation
perfect thanks, man. I got what I'm looking for.
techSith is just pro.thx.
Great tutorial thanks
Thank you 😄
great tutorial !!!!!!!!!! very helpful.
super easy to comprehend, kudos for that!
Glad you got it Haidren. Keep on learning
Thanks it helped me a lot
simple and great!
Thanks alot i like it
Thanks 😊
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!
That was an awsm explaination.
Awesome tutorial as always
Thank you! Cheers!
Thanks for this video, when I worked with redux previously I felt like what the hell is this now too cool.
Yes hooks are cool
very nice.. thanks for sharing
Legendary. Cheers!
Thanks for watching Megan :)
thanks bro
wow this is a lot easier than the old way of doing redux!
Excellent video
Thank you very much!
goddamn thank u for this helpful video :*
Nice explaining and good joke. Thanks!
Glad you liked it!
Awesome video sir.
Do we still have combineReducer in newer versions of React?
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.
@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 RUclips. 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.
Ashutosh, the end music is actually from youtube's own music library, the name of the track is "still standing". Thanks for watching.
Love that confidence on da thumbnail..migos which way hook way
never knew who you were until now and i immediately subscribed solely based on your name.
None, Dan Abramov has declared darkness a new standard.
Abramov has spoken.
Lord Abramov
Sith agrees that Dan has moved to the dark side. :)
@@internet4543 they mixed it,
they mix the container and component
@@internet4543 lol
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.
Thanks )))
Welcome!
wellcome back to React :)
great explanation..any cons of doing it this way compared to the older way?
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😂😂🤣
thanks
You're welcome!
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
I didn't mind the joke. great video!
Glad you enjoyed it! Thanks for watching!
Nice video. If possible can you make one more video with real time example by using same concept
appreciate all your videos, can we make vdo on shallowequal thing in react ? it would be helpful.
awesome sir, I really appreciate your effort and the first time I understand it. Thank you
Thank you! but what about actions?
hey techsith your video tutorial are awesome. please make a video on react deployment on shared hosting in any c panel and also it should run on subfolder like public_html/todo/index.html like this. thankyou sir your for your tutorials and content please make my requested video
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.
how would componentDidMount work here , lets say you want to do a get request at the time of rendering ?
10/10
Thanks Jaggi :)
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" }`
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 .
Two, one senior with the state and function and one junior with a changeLightBulp( ) callback.
:)
COME BACK KING
the joke is so funny that I forgot to laugh, lmao
hahahah
When did he make joke I don't even find it 🤣🤣
please tell which theme you are using
what's the music at the end please ?
Why does lost focus after type any char in InputText ? (I used hook only not with redux)
How do you update a multiple field state like "first name, last name, and amount using redux?
hey techsith, are you ever gonna have a react course on UDEMY?
I am working on it . most probably will release in JUly . I will announce it.
@@Techsithtube If you can include the interview questions too, I think it will make your course stand out, out of all the react courses.
here we don't need to use connect method right ?
Hi,can i ask you about your arrow? => .... is it ⇒? How to achieve?
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?
Fantastic tutorial, you must be a lecturer.
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!
👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍
If you want to skip the setup and boilerplate jump to 7:28
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.
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.
nice comment))
Do we need Redux when we now have Context API with useContext and useReducer hooks ?
Yes with useReducer you cant use async actions like redux thunk . in future react may introduce it.
No you don't need redux. react have all ever you need, and in better approach.
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.
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 ;)
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?
yes you can mix the new hooks with saga and thunk it should work seamlessly.
Pro just one help in react native,, can you do turorial food app filter menu
Have you already done tutorial with Thunk and hooks? Please send me the link. Great video. Love the silly joke ;)
What action gone in Redux, Phillips?