{"id":8955,"date":"2026-09-15T09:38:50","date_gmt":"2026-09-15T09:38:50","guid":{"rendered":"https:\/\/studysection.com\/blog\/?p=8955"},"modified":"2026-09-15T09:40:40","modified_gmt":"2026-09-15T09:40:40","slug":"redux-toolkit-beginner-friendly-guide","status":"publish","type":"post","link":"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/","title":{"rendered":"Redux Toolkit \u2013 Beginner-Friendly Guide"},"content":{"rendered":"<h2><b>Introduction<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">When building React applications, managing data becomes difficult as the application grows.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">At the beginning, passing data using props works fine. But when multiple components need the same data, the code can become messy and difficult to maintain.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Redux helps us manage shared application state in a centralized and predictable way.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In simple words:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/studysection.com\/blog\/redux-in-react-js\/\" target=\"_blank\" rel=\"noopener\">Redux<\/a> stores the application data in one central place called the store.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It simplifies state management and makes the application cleaner and more scalable.<\/span><\/p>\n<h3><b>Need of Redux (Avoid Prop Drilling)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">In React, data is usually passed from parent component to child component using props.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Example:<\/span><\/p>\n<div style=\"background: black; color: white; padding: 12px;\">\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 <\/span><span style=\"font-weight: 400;\">App<\/span><span style=\"font-weight: 400;\"> \u2192 <\/span><span style=\"font-weight: 400;\">Dashboard<\/span><span style=\"font-weight: 400;\"> \u2192 <\/span><span style=\"font-weight: 400;\">Sidebar<\/span><span style=\"font-weight: 400;\"> \u2192 <\/span><span style=\"font-weight: 400;\">UserProfile<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Suppose the <\/span><b>UserProfile <\/b><span style=\"font-weight: 400;\">component needs user data.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Without Redux, we may need to pass props through multiple components even when intermediate components do not use that data.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This problem is called:<\/span><\/p>\n<h3><b>Prop Drilling<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Prop drilling makes:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Code difficult to maintain<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Components tightly coupled<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Debugging harder<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Redux solves this problem by storing shared data in a global store.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Any component can directly access the required data without passing props manually.<\/span><\/p>\n<h3><b>React Redux Architecture<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Redux follows a simple one-way data flow.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-8956\" src=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2026\/09\/image-60-300x150.png\" alt=\"\" width=\"300\" height=\"150\" srcset=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2026\/09\/image-60-300x150.png 300w, https:\/\/studysection.com\/blog\/wp-content\/uploads\/2026\/09\/image-60-1024x512.png 1024w, https:\/\/studysection.com\/blog\/wp-content\/uploads\/2026\/09\/image-60-768x384.png 768w, https:\/\/studysection.com\/blog\/wp-content\/uploads\/2026\/09\/image-60-1536x768.png 1536w, https:\/\/studysection.com\/blog\/wp-content\/uploads\/2026\/09\/image-60.png 1774w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2><b>Explanation<\/b><\/h2>\n<p>&nbsp;<\/p>\n<h3><b>1. Component<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">User interacts with the UI.<\/span><\/p>\n<h3><b>2. Dispatch<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Component sends an action using dispatch.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Example:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">dispatch(increment())<\/span><\/p>\n<h3><b>3. Reducer<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Reducer updates the state based on the action.<\/span><\/p>\n<h3><b>4. Store<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Store keeps the updated application state.<\/span><\/p>\n<h3><b>5. UI Update<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Components automatically receive updated data using <\/span><span style=\"font-weight: 400;\">useSelector()<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><b>Recommended Folder Structure<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">A simple Redux Toolkit folder structure:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">src\/<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u251c\u2500\u2500 redux\/<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u2502\u00a0 \u00a0 \u251c\u2500\u2500 store.js<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u2502\u00a0 \u00a0 \u2514\u2500\u2500 counterSlice.js<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u2502<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u251c\u2500\u2500 components\/<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u2502\u00a0 \u00a0 \u2514\u2500\u2500 Counter.jsx<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u2502<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u251c\u2500\u2500 App.jsx<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u2514\u2500\u2500 main.jsx<\/span><\/p>\n<h2><b>Folder Explanation<\/b><\/h2>\n<table>\n<tbody>\n<tr>\n<td><b>File<\/b><\/td>\n<td><b>Purpose<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">store.js<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Creates Redux store<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">counterSlice.js<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Contains state, reducers, and actions<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Counter.jsx<\/span><\/td>\n<td><span style=\"font-weight: 400;\">React component using Redux<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">main.jsx<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Connects Redux with React using Provider<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h3><b>Redux Example using useDispatch and useSelector<\/b><\/h3>\n<h2><\/h2>\n<h3><b>Step 1: Install Redux Toolkit<\/b><\/h3>\n<div style=\"background: black; color: white; padding: 12px;\">\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">npm<\/span> <span style=\"font-weight: 400;\">install<\/span><span style=\"font-weight: 400;\"> @<\/span><span style=\"font-weight: 400;\">reduxjs<\/span><span style=\"font-weight: 400;\">\/<\/span><span style=\"font-weight: 400;\">toolkit<\/span> <span style=\"font-weight: 400;\">react<\/span><span style=\"font-weight: 400;\">&#8211;<\/span><span style=\"font-weight: 400;\">redux<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<h3><b>Step 2: Create counterSlice.js<\/b><\/h3>\n<div style=\"background: black; color: white; padding: 12px;\">\n<p><span style=\"font-weight: 400;\">\u00a0import<\/span><span style=\"font-weight: 400;\"> { <\/span><span style=\"font-weight: 400;\">createSlice<\/span><span style=\"font-weight: 400;\"> } <\/span><span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">&#8220;@reduxjs\/toolkit&#8221;<\/span><span style=\"font-weight: 400;\">;<\/span><span style=\"font-weight: 400;\">\u00a0const<\/span> <span style=\"font-weight: 400;\">counterSlice<\/span><span style=\"font-weight: 400;\"> = <\/span><span style=\"font-weight: 400;\">createSlice<\/span><span style=\"font-weight: 400;\">({<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">name:<\/span> <span style=\"font-weight: 400;\">&#8220;counter&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">initialState:<\/span><span style=\"font-weight: 400;\"> {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">count:<\/span> <span style=\"font-weight: 400;\">0<\/span><span style=\"font-weight: 400;\">,<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0},<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">reducers:<\/span><span style=\"font-weight: 400;\"> {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">increment<\/span><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"> (<\/span><span style=\"font-weight: 400;\">state<\/span><span style=\"font-weight: 400;\">) <\/span><span style=\"font-weight: 400;\">=&gt;<\/span><span style=\"font-weight: 400;\"> {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">state<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">count<\/span><span style=\"font-weight: 400;\"> += <\/span><span style=\"font-weight: 400;\">1<\/span><span style=\"font-weight: 400;\">;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0},<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">decrement<\/span><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"> (<\/span><span style=\"font-weight: 400;\">state<\/span><span style=\"font-weight: 400;\">) <\/span><span style=\"font-weight: 400;\">=&gt;<\/span><span style=\"font-weight: 400;\"> {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">state<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">count<\/span><span style=\"font-weight: 400;\"> -= <\/span><span style=\"font-weight: 400;\">1<\/span><span style=\"font-weight: 400;\">;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0},<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0},<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0});<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0export<\/span> <span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> { <\/span><span style=\"font-weight: 400;\">increment<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">decrement<\/span><span style=\"font-weight: 400;\"> } = <\/span><span style=\"font-weight: 400;\">counterSlice<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">actions<\/span><span style=\"font-weight: 400;\">;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0export<\/span> <span style=\"font-weight: 400;\">default<\/span> <span style=\"font-weight: 400;\">counterSlice<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">reducer<\/span><span style=\"font-weight: 400;\">;<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<h3><b>Step 3: Create store.js<\/b><\/h3>\n<div style=\"background: black; color: white; padding: 12px;\">\n<p><span style=\"font-weight: 400;\">\u00a0import<\/span><span style=\"font-weight: 400;\"> { <\/span><span style=\"font-weight: 400;\">configureStore<\/span><span style=\"font-weight: 400;\"> } <\/span><span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">&#8216;@reduxjs\/toolkit&#8217;<\/span><span style=\"font-weight: 400;\">\u00a0import<\/span> <span style=\"font-weight: 400;\">counterReducer<\/span> <span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">&#8216;.\/counterSlice&#8217;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0export<\/span> <span style=\"font-weight: 400;\">const<\/span> <span style=\"font-weight: 400;\">store<\/span><span style=\"font-weight: 400;\"> = <\/span><span style=\"font-weight: 400;\">configureStore<\/span><span style=\"font-weight: 400;\">({<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">reducer:<\/span><span style=\"font-weight: 400;\"> {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">counter:<\/span> <span style=\"font-weight: 400;\">counterReducer<\/span><span style=\"font-weight: 400;\">,<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0},<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0})<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<h3><b>Step 4: Connect Redux with <a href=\"https:\/\/blog.webnersolutions.com\/hooks-in-react\/\" target=\"_blank\" rel=\"noopener\">React<\/a><\/b><\/h3>\n<h3><b>main.jsx<\/b><\/h3>\n<div style=\"background: black; color: white; padding: 12px;\">\n<p><span style=\"font-weight: 400;\">import<\/span> <span style=\"font-weight: 400;\">React<\/span> <span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">&#8216;react&#8217;<\/span><span style=\"font-weight: 400;\">import<\/span> <span style=\"font-weight: 400;\">ReactDOM<\/span> <span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">&#8216;react-dom\/client&#8217;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">import<\/span> <span style=\"font-weight: 400;\">App<\/span> <span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">&#8216;.\/App&#8217;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">import<\/span><span style=\"font-weight: 400;\"> { <\/span><span style=\"font-weight: 400;\">Provider<\/span><span style=\"font-weight: 400;\"> } <\/span><span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">&#8216;react-redux&#8217;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">import<\/span><span style=\"font-weight: 400;\"> { <\/span><span style=\"font-weight: 400;\">store<\/span><span style=\"font-weight: 400;\"> } <\/span><span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">&#8216;.\/redux\/store&#8217;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">ReactDOM<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">createRoot<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">document<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">getElementById<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;root&#8217;<\/span><span style=\"font-weight: 400;\">)).<\/span><span style=\"font-weight: 400;\">render<\/span><span style=\"font-weight: 400;\">(<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">&lt;<\/span><span style=\"font-weight: 400;\">Provider<\/span> <span style=\"font-weight: 400;\">store<\/span><span style=\"font-weight: 400;\">=<\/span><span style=\"font-weight: 400;\">{<\/span><span style=\"font-weight: 400;\">store<\/span><span style=\"font-weight: 400;\">}<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">&lt;<\/span><span style=\"font-weight: 400;\">App<\/span> <span style=\"font-weight: 400;\">\/&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">&lt;\/<\/span><span style=\"font-weight: 400;\">Provider<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">)<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<h3><b>Step 5: Use useDispatch and useSelector<\/b><\/h3>\n<h3><b>Counter.jsx<\/b><\/h3>\n<div style=\"background: black; color: white; padding: 12px;\">\n<p><span style=\"font-weight: 400;\">import<\/span><span style=\"font-weight: 400;\"> { <\/span><span style=\"font-weight: 400;\">useDispatch<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">useSelector<\/span><span style=\"font-weight: 400;\"> } <\/span><span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">&#8216;react-redux&#8217;<\/span><span style=\"font-weight: 400;\">import<\/span><span style=\"font-weight: 400;\"> { <\/span><span style=\"font-weight: 400;\">increment<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">decrement<\/span><span style=\"font-weight: 400;\"> } <\/span><span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">&#8216;..\/redux\/counterSlice&#8217;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">function<\/span> <span style=\"font-weight: 400;\">Counter<\/span><span style=\"font-weight: 400;\">() {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">const<\/span> <span style=\"font-weight: 400;\">count<\/span><span style=\"font-weight: 400;\"> = <\/span><span style=\"font-weight: 400;\">useSelector<\/span><span style=\"font-weight: 400;\">((<\/span><span style=\"font-weight: 400;\">state<\/span><span style=\"font-weight: 400;\">) <\/span><span style=\"font-weight: 400;\">=&gt;<\/span> <span style=\"font-weight: 400;\">state<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">counter<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">count<\/span><span style=\"font-weight: 400;\">)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">const<\/span> <span style=\"font-weight: 400;\">dispatch<\/span><span style=\"font-weight: 400;\"> = <\/span><span style=\"font-weight: 400;\">useDispatch<\/span><span style=\"font-weight: 400;\">()<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">return<\/span><span style=\"font-weight: 400;\"> (<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">&lt;<\/span><span style=\"font-weight: 400;\">div<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">&lt;<\/span><span style=\"font-weight: 400;\">h1<\/span><span style=\"font-weight: 400;\">&gt;<\/span><span style=\"font-weight: 400;\">{<\/span><span style=\"font-weight: 400;\">count<\/span><span style=\"font-weight: 400;\">}<\/span><span style=\"font-weight: 400;\">&lt;\/<\/span><span style=\"font-weight: 400;\">h1<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">&lt;<\/span><span style=\"font-weight: 400;\">button<\/span> <span style=\"font-weight: 400;\">onClick<\/span><span style=\"font-weight: 400;\">=<\/span><span style=\"font-weight: 400;\">{<\/span><span style=\"font-weight: 400;\">() <\/span><span style=\"font-weight: 400;\">=&gt;<\/span> <span style=\"font-weight: 400;\">dispatch<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">increment<\/span><span style=\"font-weight: 400;\">())<\/span><span style=\"font-weight: 400;\">}<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Increment<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">&lt;\/<\/span><span style=\"font-weight: 400;\">button<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">&lt;<\/span><span style=\"font-weight: 400;\">button<\/span> <span style=\"font-weight: 400;\">onClick<\/span><span style=\"font-weight: 400;\">=<\/span><span style=\"font-weight: 400;\">{<\/span><span style=\"font-weight: 400;\">() <\/span><span style=\"font-weight: 400;\">=&gt;<\/span> <span style=\"font-weight: 400;\">dispatch<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">decrement<\/span><span style=\"font-weight: 400;\">())<\/span><span style=\"font-weight: 400;\">}<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Decrement<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">&lt;\/<\/span><span style=\"font-weight: 400;\">button<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">&lt;\/<\/span><span style=\"font-weight: 400;\">div<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">}<\/span><\/p>\n<p><span style=\"font-weight: 400;\">export<\/span> <span style=\"font-weight: 400;\">default<\/span> <span style=\"font-weight: 400;\">Counter<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<h3><b>Understanding useSelector<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">useSelector() is used to fetch state data from Redux.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Example:<\/span><\/p>\n<div style=\"background: black; color: white; padding: 12px;\">\n<p><span style=\"font-weight: 400;\">const<\/span> <span style=\"font-weight: 400;\">count<\/span><span style=\"font-weight: 400;\"> = <\/span><span style=\"font-weight: 400;\">useSelector<\/span><span style=\"font-weight: 400;\">((<\/span><span style=\"font-weight: 400;\">state<\/span><span style=\"font-weight: 400;\">) <\/span><span style=\"font-weight: 400;\">=&gt;<\/span> <span style=\"font-weight: 400;\">state<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">counter<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">count<\/span><span style=\"font-weight: 400;\">)<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<h3><b>Understanding useDispatch<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">useDispatch() is used to send actions to Redux.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Example:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">dispatch(increment())<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This updates the state inside the Redux store.<\/span><\/p>\n<h3><b>Conclusion<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Redux helps us manage shared data in React applications more efficiently.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Redux Toolkit simplifies Redux and makes it beginner friendly.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The combination of:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">useSelector()<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">useDispatch()<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">createSlice()<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">configureStore()<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">makes Redux much easier compared to older Redux patterns.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction When building React applications, managing data becomes difficult as the application grows. At the beginning, passing data using props<\/p>\n","protected":false},"author":1,"featured_media":8961,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[912],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Redux Toolkit \u2013 Beginner-Friendly Guide - Blog Posts on famous people, innovations and educational topics<\/title>\n<meta name=\"description\" content=\"Learn Redux in React JS, including Redux Toolkit, useSelector, useDispatch, store, reducers, and state management with practical examples.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Redux Toolkit \u2013 Beginner-Friendly Guide - Blog Posts on famous people, innovations and educational topics\" \/>\n<meta property=\"og:description\" content=\"Learn Redux in React JS, including Redux Toolkit, useSelector, useDispatch, store, reducers, and state management with practical examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Posts on famous people, innovations and educational topics\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/studysection\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-15T09:38:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-15T09:40:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2026\/09\/Copy-of-Copy-of-Copy-of-How-to-Create-a-Custom-Report-Builder-Source-in-Totara-6.png\" \/>\n\t<meta property=\"og:image:width\" content=\"940\" \/>\n\t<meta property=\"og:image:height\" content=\"788\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin-studysection-blog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@studysection\" \/>\n<meta name=\"twitter:site\" content=\"@studysection\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin-studysection-blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/\"},\"author\":{\"name\":\"admin-studysection-blog\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402\"},\"headline\":\"Redux Toolkit \u2013 Beginner-Friendly Guide\",\"datePublished\":\"2026-09-15T09:38:50+00:00\",\"dateModified\":\"2026-09-15T09:40:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/\"},\"wordCount\":565,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/studysection.com\/blog\/#organization\"},\"articleSection\":[\"Web Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/\",\"url\":\"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/\",\"name\":\"Redux Toolkit \u2013 Beginner-Friendly Guide - Blog Posts on famous people, innovations and educational topics\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/#website\"},\"datePublished\":\"2026-09-15T09:38:50+00:00\",\"dateModified\":\"2026-09-15T09:40:40+00:00\",\"description\":\"Learn Redux in React JS, including Redux Toolkit, useSelector, useDispatch, store, reducers, and state management with practical examples.\",\"breadcrumb\":{\"@id\":\"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/studysection.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Redux Toolkit \u2013 Beginner-Friendly Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/studysection.com\/blog\/#website\",\"url\":\"https:\/\/studysection.com\/blog\/\",\"name\":\"Blog Posts on famous people, innovations and educational topics\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/studysection.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/studysection.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/studysection.com\/blog\/#organization\",\"name\":\"StudySection\",\"url\":\"https:\/\/studysection.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png\",\"contentUrl\":\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png\",\"width\":920,\"height\":440,\"caption\":\"StudySection\"},\"image\":{\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/studysection\",\"https:\/\/twitter.com\/studysection\",\"https:\/\/www.instagram.com\/study.section\/\",\"https:\/\/www.linkedin.com\/company\/studysection\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402\",\"name\":\"admin-studysection-blog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g\",\"caption\":\"admin-studysection-blog\"},\"url\":\"https:\/\/studysection.com\/blog\/author\/admin-studysection-blog\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Redux Toolkit \u2013 Beginner-Friendly Guide - Blog Posts on famous people, innovations and educational topics","description":"Learn Redux in React JS, including Redux Toolkit, useSelector, useDispatch, store, reducers, and state management with practical examples.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/","og_locale":"en_US","og_type":"article","og_title":"Redux Toolkit \u2013 Beginner-Friendly Guide - Blog Posts on famous people, innovations and educational topics","og_description":"Learn Redux in React JS, including Redux Toolkit, useSelector, useDispatch, store, reducers, and state management with practical examples.","og_url":"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/","og_site_name":"Blog Posts on famous people, innovations and educational topics","article_publisher":"https:\/\/www.facebook.com\/studysection","article_published_time":"2026-09-15T09:38:50+00:00","article_modified_time":"2026-09-15T09:40:40+00:00","og_image":[{"width":940,"height":788,"url":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2026\/09\/Copy-of-Copy-of-Copy-of-How-to-Create-a-Custom-Report-Builder-Source-in-Totara-6.png","type":"image\/png"}],"author":"admin-studysection-blog","twitter_card":"summary_large_image","twitter_creator":"@studysection","twitter_site":"@studysection","twitter_misc":{"Written by":"admin-studysection-blog","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/#article","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/"},"author":{"name":"admin-studysection-blog","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402"},"headline":"Redux Toolkit \u2013 Beginner-Friendly Guide","datePublished":"2026-09-15T09:38:50+00:00","dateModified":"2026-09-15T09:40:40+00:00","mainEntityOfPage":{"@id":"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/"},"wordCount":565,"commentCount":0,"publisher":{"@id":"https:\/\/studysection.com\/blog\/#organization"},"articleSection":["Web Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/","url":"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/","name":"Redux Toolkit \u2013 Beginner-Friendly Guide - Blog Posts on famous people, innovations and educational topics","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/#website"},"datePublished":"2026-09-15T09:38:50+00:00","dateModified":"2026-09-15T09:40:40+00:00","description":"Learn Redux in React JS, including Redux Toolkit, useSelector, useDispatch, store, reducers, and state management with practical examples.","breadcrumb":{"@id":"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/studysection.com\/blog\/redux-toolkit-beginner-friendly-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/studysection.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Redux Toolkit \u2013 Beginner-Friendly Guide"}]},{"@type":"WebSite","@id":"https:\/\/studysection.com\/blog\/#website","url":"https:\/\/studysection.com\/blog\/","name":"Blog Posts on famous people, innovations and educational topics","description":"","publisher":{"@id":"https:\/\/studysection.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/studysection.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/studysection.com\/blog\/#organization","name":"StudySection","url":"https:\/\/studysection.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png","contentUrl":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png","width":920,"height":440,"caption":"StudySection"},"image":{"@id":"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/studysection","https:\/\/twitter.com\/studysection","https:\/\/www.instagram.com\/study.section\/","https:\/\/www.linkedin.com\/company\/studysection"]},{"@type":"Person","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402","name":"admin-studysection-blog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g","caption":"admin-studysection-blog"},"url":"https:\/\/studysection.com\/blog\/author\/admin-studysection-blog\/"}]}},"views":8,"_links":{"self":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/8955"}],"collection":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/comments?post=8955"}],"version-history":[{"count":4,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/8955\/revisions"}],"predecessor-version":[{"id":8960,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/8955\/revisions\/8960"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media\/8961"}],"wp:attachment":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media?parent=8955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/categories?post=8955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/tags?post=8955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}