Let’s look at how to use the useReducer and useContext hooks in React.js to handle global state management in a clean and easy way. In this video I explain both of these hooks in simple examples and then show how we use them together to create a very easy global state workflow.
Timestamps:
0:00 Intro
0:13 Why we use global state
3:00 useReducer Explained
11:38 useContext Explained
24:54 useReducer + useContext
49:41 Outro
React Hooks Docs:
https://reactjs.org/docs/hooks-reference.html
Subscribe: https://www.youtube.com/channel/UCQrQo7jTpOh8V9EDn9Tgnxg
#react #javascript