In this video, we build our first Redux Toolkit slice using createSlice, and use the useDispatch hook to trigger an "add" action that updates an array in the Redux store.
We’ll also walk through how to wire it all into your store and debug with Redux DevTools.
☕ Found this useful? Buy me a coffee:
https://www.buymeacoffee.com/rowadz
📂 Code Repo:
https://github.com/Rowadz/react-redux...
📚 Docs Mentioned:
createSlice → https://redux-toolkit.js.org/api/crea...
useDispatch → https://react-redux.js.org/api/hooks#...
Redux Toolkit Docs → https://redux-toolkit.js.org/
ImmerJS → https://immerjs.github.io/immer/docs/...
JavaScript Proxy API → https://developer.mozilla.org/en-US/d...
⏱️ Timestamps
00:00 Introduction
01:08 Creating the todos feature
01:53 Todos slice setup
02:22 Adding reducers
03:06 Creating action creators
03:27 Wiring the reducer into the store
04:03 Inspecting the slice in Redux DevTools
04:24 Dispatching actions on button click
08:10 Recap