"I dont even understand what dispatch does" had me laughing out loud haha thanks for the video as always!
hey man great content as usual, very useful when you go over everything step by step
for those having difficulty in understanding dispatch i think my notes will help (below) we first create an action of some condition like "CHANGE_NAME" after this we create a reducer which works on the condition specified by action (CHANGE_NAME), based on that, reducer returns some changes in state or in any field specified in payload, now to apply these changes we need to dispatch (send the changes to store) this information to store by specifying the action name like --> store.dispatch(myAction()) More examples ?? here: https://codesandbox.io/s/action-reducer-dispatch-basics-8uwi4?file=/src/App.js
Dude I gave up in tutorial hell and thank God I found you. I lobe that you explain it. for once I am looking forward to the next tutorial ! thanks ! you motivated me to think I can make a small program at work to get promoted in the company as a programmer
At Lesson 5 we were using dispatch as a function If I remember right but I am still totally lost in these parts of the lessons. Still have no idea what we are dispatching and why :D edit:lol just heard the same thing from you 9:00 "I don't even understand what dispatch does." My man. Words of wisdom. edit2: daym this makes me wanna go back to html and stay there forever.
Thanks a lot Mr. Ian this is my code down below sir. const handleAsync = () => { return function(dispatch) { // Dispatch request action here Redux.dispatch(requestingData()) setTimeout(function() { let data = { users: ['Jeff', 'William', 'Alice'] } // Dispatch received data action here Redux.dispatch(receivedData(data)) }, 2500); } };
@jamesboone1995