Learn Redux Toolkit in under 1 hour

Hitesh Choudhary
18 Aug 202358:09

Summary

TLDRIn this informative video, the presenter Hitesh introduces viewers to the Redux toolkit, a state management library that simplifies data handling in React applications. Hitesh explains the fundamentals of Redux, emphasizing its non-React centric design and how it can be integrated with React for state management. He demonstrates the creation of a Redux store and reducers, and how to use the Redux Dev tools for inspection. The tutorial includes building a to-do application to showcase the power of Redux for managing state efficiently, walking through each step from adding and deleting to-dos, to querying the state with useSelector. Hitesh's approach is practical and straightforward, aiming to clarify common misconceptions and make Redux more accessible for developers.

Takeaways

  • πŸš€ Introduction to Redux Toolkit: A beginner-friendly guide to understanding and using Redux for state management in React applications.
  • πŸ“¦ Redux is a state management library that is not exclusively tied to React, but can be used alongside React and other libraries through plugins.
  • πŸ”§ The problem of prop drilling: Redux helps to eliminate the issue of having to pass props through multiple layers of components by offering a centralized state management system.
  • 🏒 Core concepts of Redux: Store (centralized state container), Reducers (pure functions that specify how the state can be updated), and Actions (objects that describe what should happen to the state).
  • πŸ”„ Redux data flow: Data should flow in one direction from the store to the UI, with updates made through reducers in response to actions.
  • πŸ› οΈ Use of hooks in React for Redux: 'useSelector' to read data from the store and 'useDispatch' to dispatch actions to update the store.
  • πŸ“‚ Project structure: Organizing Redux logic into features or slices, with each slice containing its own reducer and initial state.
  • πŸ” Debugging with Redux DevTools: Using the Redux DevTools extension to inspect the state, actions, and changes in the store during development.
  • πŸ“ Best practices: Avoiding direct state mutation and using descriptive action and reducer names for better readability and maintainability.
  • πŸ”„ Handling undo/redo patterns: Redux makes it easier to implement complex patterns like undo/redo by keeping track of all state changes.
  • πŸŽ“ Importance of learning Redux: Despite its initial complexity, mastering Redux can greatly simplify state management and improve the scalability and maintainability of large applications.

Q & A

  • What is Redux and why is it used in state management?

    -Redux is a state management library that is not specifically centered towards React or Next.js, but can be combined with them using plugins. It is used to manage the state of an application in a more structured and predictable manner, making it easier to handle complex state logic and maintain consistency across different parts of the application.

  • What does the Redux Toolkit provide that makes working with Redux simpler?

    -The Redux Toolkit provides a set of utilities and conventions that simplify the creation of a Redux store, the management of reducers, and the interaction with the store through actions and selectors. It reduces boilerplate code and helps in following best practices, making the overall process of using Redux more straightforward and less error-prone.

  • How does Redux help in solving the issue of prop drilling in React applications?

    -Redux helps in solving prop drilling by providing a centralized store where components can directly access and update the state, eliminating the need to pass props down through multiple levels of the component hierarchy. This allows for a more efficient and clean way of managing state across the application.

  • What are the main components of a Redux state management system?

    -The main components of a Redux state management system include the store, reducers, actions, and selectors. The store holds the application state, reducers define how the state can be updated, actions are used to describe changes to the state, and selectors are functions that help in selecting and extracting data from the store.

  • How does the Redux Toolkit's 'createSlice' method simplify the process of creating reducers?

    -The 'createSlice' method in the Redux Toolkit simplifies the process of creating reducers by allowing developers to define the initial state, reducers, and actions in a single object. It automatically generates action creators and action types, making it easier to manage and maintain the state logic within the application.

  • What is the role of 'useDispatch' and 'useSelector' hooks in a React application using Redux?

    -The 'useDispatch' hook is used to dispatch actions to the Redux store, allowing components to trigger state changes. The 'useSelector' hook is used to access and select data from the Redux store, enabling components to display the current state or parts of it. These hooks facilitate the connection between React components and the Redux state management system.

  • How does the Redux state management system ensure a unidirectional data flow?

    -Redux ensures a unidirectional data flow by mandating that state can only be updated through reducers in response to actions. This means that all changes to the state must go through a clear and predictable path: actions describe what happens, reducers define how the state changes, and the store holds the current state.

  • What is the significance of using unique IDs for each to-do item in the Redux store?

    -Using unique IDs for each to-do item in the Redux store allows for easier management and manipulation of individual items. It enables specific items to be targeted for actions such as updates or deletions without affecting other items in the list, leading to a more efficient and organized state management process.

  • What is the role of the 'Provider' component in a Redux-enabled React application?

    -The 'Provider' component from React-Redux is used to make the Redux store available to all components in the application. It wraps the root component of the application, ensuring that any component can access and interact with the Redux store through the use of hooks like 'useDispatch' and 'useSelector'.

  • How does the Redux Toolkit handle state immutability?

    -The Redux Toolkit automatically handles state immutability, ensuring that the state is not directly mutated. Instead, it requires the use of specific methods and patterns, such as the 'createSlice' method and the 'immer' library, which allows for the creation of draft state copies that can be modified without directly altering the original state.

Outlines

00:00

πŸ“Ί Introduction to Redux Toolkit

The video begins with the host, Hitesh, returning from vacation and introducing the topic of Redux Toolkit. He explains that the video will serve as a no-nonsense crash course on Redux Toolkit, aiming to help viewers understand its simplicity and practical application in state management. Hitesh briefly recalls previous discussions about building an application similar to Dribbble and emphasizes the importance of state management in larger projects. He introduces the concept of Redux as a state management library that is not limited to React or Next.js, but can be used with React plugins for state management within React applications. Hitesh then demonstrates the creation of a new project using 'create-react-app' and discusses the benefits of Redux Toolkit, including its straightforward approach to state management and the lack of jargon.

05:01

πŸ“Š Understanding Redux and State Management

In this paragraph, Hitesh delves deeper into the concepts of Redux and state management. He explains the problem of prop drilling in React components and how a global state, or a centralized store, can simplify data management. Hitesh introduces key terms such as 'store', 'reducers', 'useSelector', and 'useDispatch', providing a basic understanding of their roles in Redux. He emphasizes the importance of a single data flow in React and how Redux enforces this through its rules for updating and reading data from the store. Hitesh also discusses the idea of 'slices' and how they help in organizing reducers and maintaining the initial state of the store. The paragraph concludes with a brief overview of the steps involved in setting up Redux Toolkit for a project.

10:02

πŸ› οΈ Installing Redux Toolkit and Initial Setup

Here, Hitesh guides viewers through the installation process of Redux Toolkit and its integration with a React application. He starts by instructing how to install Redux and React-Redux libraries using npm, highlighting the importance of the Redux Toolkit for easier configuration. Hitesh then demonstrates how to set up the store by creating a 'store.js' file and using the 'configureStore' method from the Redux Toolkit. He also briefly touches on the creation of reducers and the importance of following good practices for structuring the project. The paragraph concludes with Hitesh discussing the need to wire up the reducers with the store and the process of creating a 'slice' for managing to-do items within the application.

15:03

πŸ” Creating and Exporting the To-Do Slice

In this segment, Hitesh focuses on creating a 'slice' for managing to-do items within the Redux store. He explains the concept of a 'slice' and how it helps in organizing the initial state and reducers for a specific feature. Hitesh demonstrates the process of creating a 'ToDoSlice.js' file using the 'createSlice' method from the Redux Toolkit. He details the structure of the slice, including the initial state, the 'addToDo' and 'removeToDo' reducers, and the use of 'nanoid' for generating unique IDs for each to-do item. Hitesh also discusses the importance of exporting the slice's actions and reducer so that they can be used in the rest of the application. The paragraph concludes with Hitesh showing how to wire up the 'ToDoSlice' with the store and the importance of this step for the functionality of the application.

20:04

πŸ”§ Implementing Add and Remove Functionality

This paragraph covers the implementation of adding and removing to-do items within the Redux store. Hitesh explains the process of using 'useDispatch' and 'useSelector' hooks to interact with the store. He demonstrates how to create an 'addToDo' component that collects user input and dispatches an action to add a new to-do item to the store. Hitesh also shows how to create a 'ToDoList' component that uses 'useSelector' to access and display the list of to-do items from the store. He discusses the importance of structuring components to avoid prop drilling and how Redux simplifies state management. The paragraph concludes with Hitesh explaining how to implement the functionality to remove a to-do item by dispatching an action with the item's unique ID.

25:05

🎨 Styling and Displaying To-Do List

In this part, Hitesh focuses on styling and displaying the to-do list within the application. He discusses the use of CSS classes and Tailwind CSS for styling the to-do list and individual items. Hitesh demonstrates how to loop through the to-do items using the 'map' function and display each item with its unique ID and content. He also covers the implementation of delete functionality within the to-do list, allowing users to remove items directly from the list. Hitesh emphasizes the simplicity of managing state with Redux and how it streamlines the process of updating and displaying data in the application. The paragraph concludes with Hitesh showing the final result of the to-do list with add and remove functionalities, highlighting the ease of state management and the clean structure of the Redux-powered application.

30:07

πŸ“ Wrapping Up the Redux Toolkit Tutorial

In the concluding paragraph, Hitesh summarizes the key points covered in the Redux Toolkit tutorial. He reiterates the simplicity of setting up and using Redux for state management in React applications. Hitesh emphasizes the importance of creating a store, defining slices for features, and using 'useSelector' and 'useDispatch' for interacting with the store. He also highlights the ease of adding, updating, and removing data from the store, and how this simplifies the development process. Hitesh encourages viewers to explore the Redux documentation for further learning and to apply the concepts learned in building larger, more complex applications. The tutorial ends with Hitesh inviting feedback and encouraging viewers to engage with the content.

Mindmap

Keywords

πŸ’‘Redux

Redux is a state management library used in conjunction with React applications. It helps manage application state in a predictable way by maintaining a single, immutable state tree. In the video, Redux is introduced as a solution to prop drilling and complex state management issues, emphasizing its role in making state changes predictable and manageable.

πŸ’‘Redux Toolkit

Redux Toolkit is an official, opinionated, batteries-included toolset for efficient Redux development. It provides a simplified API, and various utilities like the createSlice function to make building a Redux store easier. The video highlights Redux Toolkit as a means to simplify the Redux configuration process, making it more accessible for beginners.

πŸ’‘State Management

State management refers to the process of handling the state (data) in an application, particularly in a way that it can be easily maintained and updated. In the context of the video, state management is a key challenge addressed by using Redux, allowing for a centralized and consistent way to handle data across a React application.

πŸ’‘Create React App

Create React App is an officially supported tool by Facebook for creating single-page React applications. It simplifies the process of setting up a new React project and provides pre-configured build processes. In the video, the speaker uses Create React App to quickly bootstrap a new project for demonstrating Redux integration.

πŸ’‘Provider

In the context of Redux, a Provider is a component that makes the Redux store available to all child components in the component tree. It is used to wrap the root component of the application, ensuring that any component can access the store and use Redux for state management. The video emphasizes the importance of the Provider for making the Redux store globally accessible.

πŸ’‘Dispatch

Dispatch is an action in Redux that sends an action object to the store, which in turn invokes the reducer functions to update the state of the application. It is a fundamental concept in Redux, as it defines how state changes are triggered and managed. In the video, the speaker explains how to use dispatch to send actions to the store, facilitating state updates.

πŸ’‘Reducer

A reducer is a pure function in Redux that takes the previous state and an action as input, and returns the next state. Reducers are responsible for describing how the state changes in response to actions, ensuring that the state changes are predictable and consistent. The video discusses reducers as the core mechanism for updating the state within the Redux store.

πŸ’‘UseSelector

UseSelector is a hook provided by the React-Redux library that allows components to access the Redux store's state. It is used to read data from the store without having to dispatch actions. In the video, useSelector is introduced as a means for components to retrieve state data and stay up-to-date with any changes.

πŸ’‘Slice

In the context of Redux, a slice refers to a portion of the Redux store that represents a specific part of the state and the corresponding reducers that manage it. Slices help in organizing the state and actions in a structured way, making the code more maintainable. The video introduces the concept of slices as a way to define the initial state and reducers for a specific feature or part of the application.

πŸ’‘Action

In Redux, an action is an object that represents an intention to change the state. It contains information about what should happen, and may include data (payload) necessary for the change. Actions are the only way to trigger state changes in Redux, and they are handled by reducers to produce new state updates. The video emphasizes the importance of actions as the primary mechanism for state changes in a Redux application.

Highlights

Redux is a state management library that is not specifically designed for React, but can be combined with React for state management in React applications.

The Redux Toolkit is a crash course guide focusing on the practical code aspects of Redux, avoiding analogies and jargons.

Before the vacation, the discussion was around building an application idea called Spark, inspired by Dribbble, focusing on functionality rather than cloning Dribbble.

State management is a key aspect of the project, and using a state management library in larger projects can significantly simplify development.

The goal is to teach state management and demonstrate how it can be implemented in a project, even though it might seem complex initially.

A new project is created with the Redux Toolkit, emphasizing the straightforward approach without jargon, focusing on the essentials.

The Redux Toolkit simplifies state management, making it easier for developers to understand and implement in their applications.

The concept of global state is introduced as a solution to prop drilling, where information can be accessed directly without passing through multiple components.

The Redux architecture includes key concepts such as the store, reducers, useSelector, and useDispatch, which are explained in a straightforward manner.

The store is a centralized place that holds all the state information, and it can be accessed directly using the useSelector hook.

Reducers are functions that update, add, remove, or delete information in the store, and they should be the only way to manipulate state in a Redux application.

The useSelector hook allows components to selectively ask for specific information from the store without directly interacting with it.

The useDispatch hook is used to call a specific reducer to update information in the store, maintaining the single data flow rule in React.

The tutorial walks through the process of setting up Redux with the Redux Toolkit and React, including the installation of necessary packages and the creation of a store.

The creation of a 'slice' is introduced, which is a piece of the state responsible for tracking the initial state and reducers for a specific feature.

The tutorial demonstrates how to create the initial state and reducers for a to-do list application, using the Redux Toolkit's createSlice method.

The process of adding and removing to-do items is explained, showcasing the simplicity of using Redux for state management in a React application.

The video concludes with a summary of the key concepts learned and encourages viewers to explore the Redux Toolkit further for their projects.

Transcripts

play00:00

hey there everyone hitesh here back

play00:02

again with another video and yes I'm

play00:04

back from the vacation and welcome to

play00:06

this amazing video in this video we are

play00:08

going to discuss about the Redux toolkit

play00:11

this is a no-nonsense crash course guide

play00:14

on the Redux toolkit which will help you

play00:16

to directly jump into Redux toolkit

play00:18

avoiding all those analogies all those

play00:22

jargons and just focusing on the code

play00:24

part so that you can understand how

play00:26

simple it is now Redux is Redux is a

play00:29

state management Library which is not

play00:32

really Centric towards react or nexjs

play00:34

but it's in kind of an open-minded

play00:36

library but you can have its plugin

play00:39

Redux react so that you can combine it

play00:41

and have State Management in the react

play00:43

that's what we are looking for but why

play00:46

suddenly a Redux a crash course Satish

play00:49

just before you went on to vacation we

play00:51

were dealing with something else yes I

play00:53

know exactly that let me show you that

play00:55

as well so before I went on to the

play00:57

vacation I exactly remember we were

play00:58

discussing that how we can actually

play00:59

actually build this application idea

play01:02

spark which is very much inspired from

play01:04

the dribble and we're not just trying to

play01:06

clone dribble here we are just trying to

play01:08

have its functionality and I want to

play01:10

show you how powerful next year is an

play01:12

app right can be so that we can have all

play01:15

of this thing all together one of the

play01:17

major component I wanted to reach in

play01:19

this one is of course upright of course

play01:20

nexjs but the State Management as well

play01:23

and I want to show you that how in the

play01:24

bigger projects you can have a state

play01:26

management library and make your life so

play01:29

much easier so that's one of the goal

play01:30

and if I click on this this is how it

play01:32

works we have already seen that it

play01:34

actually is much more slower in the

play01:36

development process in the production

play01:38

it's much more faster this is all the

play01:40

project is this is all it will be doing

play01:41

but one of the key aspect of this

play01:44

project is the state management I wanted

play01:45

to teach you the state management and if

play01:48

I'll directly let you jump into this

play01:49

project and teach you the stage

play01:51

management there it is going to be

play01:53

clumsy it is going to be really really

play01:55

comesy so I'm taking up this special

play01:57

video here or the segment of the video

play01:59

in case you're watching all that in the

play02:01

one go that where we are going to create

play02:02

a fresh new project we'll discuss what

play02:05

the Redux toolkit is absolute basic no

play02:07

jargons here straight to the point and

play02:10

we'll understand it that's the goal I

play02:11

hope you like it so let's go ahead and

play02:13

get started with this one so let me

play02:16

share my screen first and I'm gonna go

play02:18

on to my terminal and I'll first go into

play02:22

one of the folder which is on the

play02:23

desktop and I guess I named it as

play02:25

English because these days I'm making

play02:27

content in different languages as well

play02:28

yes I'm bilingual in fact multilingual

play02:31

yeah anyways so here I'm going to go

play02:34

ahead and say npx and then npx npx come

play02:38

on

play02:38

and we'll be going with the create react

play02:40

app and we'll be calling it as Redux

play02:45

Redux

play02:47

toolkit

play02:49

Redux toolkit crash

play02:52

is it a big name uh I'm not sure okay uh

play02:55

I I understand a lot of you might be

play02:56

thinking hey fish come on now let's can

play02:59

we leave this create react app and can

play03:01

we go to the wheat or something yes I am

play03:04

aware of it that wheat is much more

play03:05

faster much more better but I wanted to

play03:07

make it much more friendly for beginner

play03:09

in case you are a wheat fan hey go with

play03:11

the wheat but I'll introduce wheat in a

play03:13

later point in my in my channel I

play03:16

haven't yet introduced V to the people

play03:17

so I'm not interested in using it as of

play03:19

now so I'll let it do its work in the

play03:21

behind the scenes and in the meantime

play03:22

I'll take you on to this new website

play03:24

eraser by the way this is almost similar

play03:27

to excally draw and I want to treat you

play03:29

about how the Redux actually work

play03:30

because one of the thing which Redux

play03:32

guys have absolutely amazingly done is

play03:35

the bad documentation like the library

play03:37

is good the founder is good but still

play03:39

they haven't actually done any such good

play03:42

thing which makes the documentation life

play03:44

easier come on people add some diagrams

play03:46

here my humble request if you are on the

play03:48

Twitter just take this portion of the

play03:50

video and my humble request adds some

play03:52

diagrams make life easier you have

play03:54

already make my life easier with the

play03:56

Redux toolkit there is no jargon here

play03:58

it's so much easier now just add

play04:00

diagrams okay so let's first understand

play04:03

what is this whole thing and whole drama

play04:05

is there is one Concept in the in the

play04:08

entire react is known as that there are

play04:10

lots of components like this is a

play04:12

component and once you have this

play04:13

component uh you can have multiple

play04:15

components inside it so there will be

play04:17

another component there and there could

play04:19

be another component here and there

play04:21

could be another component here so the

play04:23

idea behind the state management or

play04:25

having it that if you really want to

play04:27

have anything inside it so let me just

play04:30

go ahead and try to zoom this

play04:32

so let's just say I want to pass on some

play04:35

information to this inner box so this is

play04:37

my uh very very inner so I'll just call

play04:40

this one as inner if I want to pass on

play04:43

this information I don't have much of

play04:44

the ways to pass on this so this is a

play04:46

component which is calling this

play04:48

component which is calling this

play04:49

component and which is calling this

play04:50

component and the job of displaying the

play04:53

information is on this very Inner Circle

play04:55

or inner component itself I have only

play04:58

one way that hey this box needs to pass

play05:00

information to this box and then this

play05:03

box oops and then on top of this this

play05:07

box needs to pass on information if it

play05:09

can allow me to draw it

play05:11

yeah I can zoom it like this that's nice

play05:15

not much actually I'm kind of a fresh

play05:18

new one to this product but anyways so

play05:20

what you can do is further down the road

play05:22

you can actually pass on you get the

play05:24

idea so the first big box actually

play05:25

passes the information to the second box

play05:27

the second box will pass on information

play05:29

to this box this box will pass on

play05:31

information to this box and finally this

play05:33

will be able to display the information

play05:35

uh technically in the technical

play05:37

communication world this is known as

play05:39

prop drilling the properties are getting

play05:42

drilled one by one one by one and that

play05:44

makes life so much difficult if there

play05:47

could be a better solution then

play05:49

obviously things could be much more

play05:50

easier what could be the better solution

play05:52

that if we actually go ahead and create

play05:55

a global state or you can say Global

play05:58

placeholder and if any point of time

play06:01

anybody needs any information they can

play06:04

just just Reach Out directly that hey

play06:05

you guys you guys need the information

play06:07

hey just ask to it directly however you

play06:10

ask yeah this is how you ask if you you

play06:12

need information hey you just go ahead

play06:14

and apply approach it directly to this

play06:16

guy yeah that would be much more simpler

play06:19

but again the problem is that if anybody

play06:22

can actually reach out for the

play06:23

information probably they could update

play06:25

the information as well and if anybody

play06:27

could update the information the core

play06:29

Foundation of react gets shaken down

play06:32

that hey there should be only one way of

play06:34

the data flow and all the UI gets

play06:36

updated so there should be some rules

play06:38

around how the data should be updated

play06:39

and there should be some rules about how

play06:41

can I read data from this centralized

play06:43

store that is it my friend that is your

play06:47

state management that is your Redux that

play06:49

is even your zest stand or any other

play06:51

thing that you are trying to learn

play06:52

that's it that's the basic so in the

play06:54

world of Redux you will find that there

play06:56

are a couple of jargons that you

play06:57

actually learn and there are not much

play06:59

now they're not much trust me it's super

play07:01

super easy so the first jargon that you

play07:03

are going to learn about is the store

play07:05

what is this store nothing the diagram

play07:08

which I said here this big box yes

play07:10

that's the store it keeps all the

play07:12

information at a centralized place

play07:13

whenever I need it I can just ask

play07:15

information from it that's the first

play07:17

thing that is your store now another

play07:20

thing is uh something known as reducers

play07:23

now this is really really nice so let me

play07:25

just go ahead and write the terms first

play07:27

so another term that comes and is being

play07:29

used quite a lot is known as reducer so

play07:31

what are these reducers reducers are

play07:34

almost not really accurate to say this

play07:36

but are almost like controllers their

play07:39

job is to just update the things or add

play07:43

the things remove the things delete the

play07:45

things so all the actions or the

play07:48

interesting thing that happens

play07:49

uh can only be done by reducers you

play07:52

cannot no longer Define the function and

play07:53

click on the button and do things

play07:54

wherever you like no you shouldn't be

play07:56

doing that if you're using State

play07:57

Management it should be done via some

play08:00

reducers now what is reducer is just an

play08:03

object nothing more than that it's just

play08:05

an object which has a lot of key value

play08:06

things each key is almost like an action

play08:09

like your ad to do you're removed to do

play08:11

you're delete to do so these are just

play08:13

actions just like that so this is

play08:15

another thing which is known as reducer

play08:17

all right so once you have this reducer

play08:19

what else what else is there there are

play08:22

actually two more Concepts uh that

play08:24

you're going to learn

play08:26

and you will be seeing that I'll walk

play08:27

you through with the Practical examples

play08:28

as well another concept that you're

play08:31

going to see is uh this guy so once you

play08:33

have this one where is it going okay so

play08:37

another concept that you're going to see

play08:39

is actually known as oh where is my

play08:42

browser where is my browser why did you

play08:44

came suddenly anyways uh so another key

play08:47

concept is uh let me just go ahead and

play08:49

just use it

play08:51

you'll using you'll be using this hook

play08:53

as well I'll write this directly so that

play08:55

if you are taking notes you can take

play08:56

that which is a use selector now what's

play08:59

the role of this you selector now

play09:01

consider this that use selected is a guy

play09:03

which can directly talk to the store so

play09:05

when I said that your component can

play09:07

anytime ask the information no no no no

play09:09

they don't just directly go to the store

play09:11

and use that they use an additional hook

play09:14

which is known as use selector so that

play09:17

they can selectively ask the store that

play09:19

I need this information that's it yeah

play09:22

another word that you are going to hear

play09:24

is known as this so I'll just go ahead

play09:27

and use this is use dispatch or some

play09:30

people call it as directly dispatched

play09:31

it's it's really the same no big deal

play09:33

there what is this dispatch so whenever

play09:36

you want to update some information in

play09:38

the store then obviously we'll do it by

play09:40

reducer but you cannot directly call the

play09:42

reducers it will break the flow in that

play09:45

case what we do is we use a hook known

play09:48

as use dispatch in which we say that I

play09:50

want to call a a very specific reducer

play09:53

and this reducer finally gets an update

play09:56

in the store that's it

play09:58

told you Redux toolkit is so much easier

play10:01

now yes there are a couple of more

play10:03

jargons like slices and all of that but

play10:05

they are not such a big deal as I'll

play10:07

walk you through with the things as

play10:08

we'll be building it you'll find it so

play10:11

much easier to do things so this is it

play10:13

let me summarize this again because this

play10:15

is something something really

play10:16

interesting what is the problem the

play10:18

problem was simply that we were having

play10:20

an issue of prop drilling if I want to

play10:22

keep on passing the information into

play10:24

multiple of these components then there

play10:27

could be a problem that I might be keep

play10:29

on drilling the props and unnecessary

play10:31

passing the information for the

play10:33

components which don't even need it so I

play10:35

decide to create a global object which

play10:38

is known as a store and anytime I need

play10:40

information I can just ask it and since

play10:42

that's a one source of the truth I can

play10:44

just update the information to it and I

play10:46

can bring on the information from it

play10:48

pretty simple so for this Redux actually

play10:51

came into the picture it says I'm a

play10:53

state management Library we also used a

play10:56

Redux react Redux to actually really

play10:58

wire up together the Redux and the react

play11:01

part of it and that is the library which

play11:03

does it so store is one such Global

play11:06

store which keeps track of all the

play11:08

states and everything then comes up this

play11:10

reducer reducer is nothing almost you

play11:12

can compare it with the controller where

play11:14

all the Logics are being written and how

play11:17

we can actually use them so use selector

play11:19

can directly talk to the store to bring

play11:21

any information from out of it and use

play11:24

dispatch is used to is used along with

play11:27

the reducer to update information in

play11:29

store Braille is simple Circle told you

play11:32

it's super super easy

play11:34

okay uh now uh we don't need much

play11:37

actually from this one so by the way

play11:39

this is what we'll be building up uh in

play11:41

the in the long run uh in this video

play11:43

itself so this is a very simple

play11:45

application all we are going to do is

play11:47

we'll be able to add some to-do's and

play11:49

we'll be able to remove some to-do I'll

play11:50

give you assignment of uh implementing

play11:53

the edit part and probably more such

play11:55

things like ticks and all of that you

play11:57

can try that out but the goal is to give

play11:59

you a simplistic approach so that later

play12:01

on when we come on to this one this is

play12:02

where we'll be handling this State

play12:05

Management in the login section the

play12:07

authentication section as well as in

play12:09

these project creation section as well

play12:11

so you'll find you'll find it much more

play12:12

as a revision there all right so if you

play12:14

wish you can read more documentation

play12:16

here but I think we are all set and good

play12:18

so we can just go ahead and minimize

play12:19

this so this is the entire thing that

play12:21

we'll be building up obviously we have

play12:22

build it that's why I'm showing you the

play12:24

entire demo and all of this so we'll be

play12:25

going through with that okay first let

play12:27

me open up these things which we have

play12:30

created so this is react react crash

play12:32

course all right so this seems okay

play12:35

everything is looking decent I need to

play12:38

inject some of the Tailwind packages as

play12:41

well so let me go ahead and start this

play12:43

let's go on to Google and inject

play12:46

Tailwind as well

play12:48

Tailwind CSS because yes we use the

play12:51

Tailwind in that so installation

play12:53

I'll be Telvin CLI uh no we are

play12:57

framework guides do we have some guide

play12:59

on react itself

play13:01

create react app yeah so npm install

play13:04

Tailwind then we are going to initialize

play13:06

this so let me just go ahead and quickly

play13:08

copy this move back to my vs code

play13:12

seems like some of my shortcuts are not

play13:14

working anyways so we'll be just

play13:16

injecting this as a Dev dependency let's

play13:19

go back on to the Chrome

play13:21

and let's initialize this Tailwind CSS

play13:24

so copy this go back on to vs code and

play13:28

in it okay configuration file should be

play13:31

generated there we go now after this

play13:33

we'll be saying that hey content needs

play13:35

to be updated like this so copy this go

play13:37

back

play13:38

and we'll be saying in the config the

play13:41

content needs to be copied like this no

play13:44

extra comma

play13:45

all right save that and what else we

play13:47

need in the index CSS we need all of

play13:50

these guys so yep

play13:52

go back and inside the source do we have

play13:56

index dot CSS yep I'll be not changing

play13:59

too much of the things I'll just keep

play14:01

them as it is so just want to inject

play14:02

because the to-do's will look at least

play14:05

decent if we have this one and I can use

play14:07

uh this one so this one should be all

play14:09

good we have configured our Tailwind now

play14:11

next up comes is the interesting part is

play14:14

let's go into package.json and this is

play14:18

where things get interesting right now

play14:20

we have react and react Dom these are

play14:22

the two important library to make a

play14:23

react app in case you have opened up

play14:25

your application with the wheat then

play14:27

these are the only guys you need but now

play14:29

we need to install uh the Redux part of

play14:32

it so how can we actually go ahead and

play14:34

inject the Redux that's that's the most

play14:36

important the first thing you have to do

play14:38

is go on to the docs yeah literally okay

play14:41

so this is where the Redux and this is

play14:44

the installation where is the

play14:45

installation getting started

play14:48

and

play14:49

okay here is the one so npm install

play14:53

Redux toolkit so don't install just the

play14:55

Redux or the Redux JS now what you want

play14:58

to install is actually uh Redux with the

play15:02

toolkit so this is going to make life

play15:04

easier otherwise yes you can still work

play15:06

with it but the configuration is little

play15:08

bit more complex in the original Redux

play15:11

or the original react Redux toolkit is

play15:13

much more easier so we'll be installing

play15:16

this one as well I told you Redux is a

play15:17

standalone library to interact or to

play15:19

allow it to interact with react it needs

play15:22

another Library so that's this Library

play15:23

okay let's go back and clean this paste

play15:27

it

play15:28

and boom till the meantime I can just go

play15:31

ahead copy this hopefully that should be

play15:34

good

play15:35

and that's it so till when we have

play15:37

installed optionally but now what we

play15:39

need is this one okay so notice here

play15:41

Redux toolkit and what else we have what

play15:45

else we have yeah react Redux that is

play15:47

all that is all what we need in order to

play15:49

build this application uh yes still

play15:52

there are couple of things which you

play15:54

need to do in order to make sure that

play15:56

things are properly working and things

play15:58

are actually going on and there are some

play16:00

folder structures and all of that that

play16:01

you have to follow but nothing too much

play16:04

I'll just walk you through with the

play16:05

step-by-step process of how it is being

play16:07

done and all of that so don't worry too

play16:09

much it's actually easier don't worry

play16:11

I'll walk you through with the

play16:12

step-by-step process

play16:14

step one is to create a store okay so

play16:17

let's create a new folder I'll call this

play16:19

one as app some people call it directly

play16:21

a store no big deal feel free to call it

play16:23

whatever you like and let's just call

play16:25

this one as store.js

play16:27

okay how we are going to go ahead and

play16:29

create a store in order to create a

play16:31

store there is a method which is given

play16:33

to you known as configure store so I'll

play16:35

just go ahead and say that I need

play16:37

something and I need it from this

play16:40

actually comes from the react Redux

play16:42

toolkit so

play16:45

Redux toolkit no preductor.js

play16:50

why is it not suggesting me

play16:53

okay probably I need to reload my

play16:55

application so I'll just say

play16:58

command shift p reload yeah reload my

play17:01

window

play17:02

hopefully now it's going to give me so

play17:04

I'll say import something from oh I need

play17:07

to say add the rate Redux yeah this is

play17:10

the one at the rate Redux toolkit what

play17:12

do you need from this one I need

play17:13

configure store

play17:15

so this is a method which is responsible

play17:17

for do majority of the things now just

play17:20

alone you cannot create a store that is

play17:22

an interesting concept and obviously you

play17:24

need to export this so that you can use

play17:26

it later on so we'll just call this one

play17:28

as a store and configure store and

play17:30

that's it now inside this you go ahead

play17:32

and mention your reducers now what is a

play17:34

reducer nothing it just is an object

play17:36

nothing nothing much more than that so

play17:38

I'll just put a comma just for the

play17:40

housekeeping purpose and I'll just close

play17:41

this one here and the method gets closed

play17:44

here that is it now if you remember I

play17:47

told you in the diagrams that hey now

play17:50

the store is all done and in order to

play17:52

make any update in the store it should

play17:55

be aware of these reducers so that's

play17:57

where the reducers are we haven't

play17:58

written any reducers here forget about

play18:01

using it via the dispatch we haven't

play18:02

written that so we need to now write

play18:04

some of the reducers all right so how we

play18:07

can go ahead and write some of these

play18:09

reducers now there are a lot of good

play18:12

practices you can say or a lot of

play18:13

guidelines that are given by a variety

play18:15

of developers if you want to follow them

play18:18

that's great if you don't want to follow

play18:19

that's totally okay just a file name so

play18:22

right click create a new folder and we

play18:24

usually call them as features okay once

play18:27

the features are there then there could

play18:29

be many features in any application like

play18:31

the logins authentication create a

play18:34

project or maybe chat application there

play18:36

could be lot so in this you divide them

play18:38

based on the functionality what they are

play18:41

doing so in this case we are just doing

play18:42

one which is to do so okay I'll just add

play18:44

it to do now inside this to do we'll

play18:46

create a slice okay now that's a new

play18:48

word of the issue didn't discuss that

play18:49

okay I'll just go ahead and say to do

play18:52

slice dot JS so one thing is clear that

play18:55

it's nothing magical it's just a slice

play18:57

it just is just Javascript file okay

play19:00

what is this slice now slice is nothing

play19:03

this is one guy which actually helps you

play19:06

to create a big object which you which

play19:10

you actually export as well and this

play19:12

slice is responsible for tracking your

play19:14

initial state of the store as well as

play19:17

all of your reducers are also collected

play19:20

here okay nothing more slice is just a

play19:24

piece you extracted that piece and you

play19:26

simply said hey this is going to be my

play19:28

slice which is going to be linking all

play19:30

the reducers and the initial state of

play19:32

the store store needs to know what is

play19:34

the default or how do I get started what

play19:37

is my starting point my initial state so

play19:39

this is where all the thick things

play19:41

actually comes up into this one once you

play19:43

see that how the slice is being created

play19:45

at one thing that's it it is a

play19:48

repeatable process you'll be able to do

play19:50

it in so much more so will be importing

play19:52

some more stuff so we'll be importing so

play19:54

we'll be again importing it from Redux

play19:57

toolkit and what do we want to bring in

play20:00

now one thing that we'll be bringing

play20:01

which will help us to do this is create

play20:03

slice create slice yeah here it is now

play20:07

create slice

play20:09

this is the only method that is required

play20:12

but since we are creating to do's and

play20:14

every to-do needs some unique ID we can

play20:16

store them in an array and loop through

play20:18

the indexes of array but again this

play20:21

might give you some of the performance

play20:22

issues I don't want to talk about it too

play20:25

much here but yes looping through the

play20:27

arrays and providing keys and array

play20:29

indexes not a great idea but hey some

play20:31

people do that and there is no big deal

play20:33

another thing which Redux toolkit

play20:35

automatically provides you is the Nano

play20:37

ID so each of the value that we are

play20:40

adding we can use this Nano ID this is

play20:41

almost like uuid unique IDs basically

play20:44

the next step is to create an initial

play20:46

State what is your initial State and

play20:48

what is this initial state it can be an

play20:50

array it can also be an object yeah

play20:52

literally in JavaScript we are in

play20:54

JavaScript realm everything can be an

play20:56

object the initial state of the to-do's

play20:58

is empty array it could be something

play21:00

like you might want to do some of the

play21:03

fetching of the database and you might

play21:05

want to store something here yeah that

play21:07

could be done but in this case we will

play21:09

be doing that actually when will be

play21:10

working on the major project but right

play21:12

now I just want to keep it simple it is

play21:13

absolutely easy now one thing that you

play21:16

do is you actually export a slice and

play21:19

what does the slice contain it contains

play21:21

couple of things first let's go ahead

play21:22

and Export this so we're going to go

play21:24

ahead and say export const to do slice

play21:27

and we'll say hey let's just go ahead

play21:28

and create a slice first let's just

play21:30

close this so that it doesn't yell at me

play21:32

couple of things you have to do first

play21:34

thing is provide a name to this because

play21:37

later on it might be very confusing that

play21:39

what slice denotes what one slice could

play21:42

be denoting authentication one slice

play21:44

could be denoting projects one slide

play21:46

could be slice could be denoting the

play21:48

chat app so there could be many so first

play21:49

good thing is although you don't

play21:51

reference it much here but later on it

play21:53

could be useful especially in the in the

play21:57

this what do we call this what do we

play22:00

call this when you go ahead and do an

play22:03

inspect element you know I forgot the

play22:05

name how could I forgot the name okay uh

play22:08

you right click yeah these Dev tools how

play22:11

can I forget the name it's it's

play22:12

important for the dev tools as well come

play22:15

on man okay then the next thing that you

play22:18

provided to this slice is this initial

play22:20

state so that somebody can actually

play22:22

track what's at the initial position

play22:24

another thing that you provided is

play22:26

reducers what do I call it what is

play22:28

reducer if you remember what is reducers

play22:31

nothing just an object yeah so reducer

play22:35

is nothing much more is just an object

play22:37

so let's go ahead and provide an object

play22:39

there we go that is it now what does

play22:41

this object consist of

play22:43

this object reducer since you know that

play22:46

reducer will be talking to the store so

play22:49

there could be multiple reduce reducers

play22:51

which will be responsible for updating

play22:53

the state of the store so there is a

play22:57

pattern or there is a method how you

play22:58

write your reducer so first of all you

play23:01

provide a name because this could be

play23:02

easy like let's just say we want to add

play23:04

some to-do's so let's just say this is

play23:06

the ad to do and we what we want to do

play23:08

is we actually write a method into it so

play23:10

we'll be using an arrow function so just

play23:12

like this there are two compulsory thing

play23:14

that you have to pass on to every

play23:16

reducer the first is actually the state

play23:18

and state is something which is super

play23:20

important here because

play23:22

otherwise how it will know what is

play23:24

initially in my store or how can I

play23:27

update that state so state is important

play23:28

another important item is pass on this

play23:31

action I'll come back on to this action

play23:34

what this action is it's a pretty

play23:35

interesting as you can see here as well

play23:36

action actually is something through

play23:39

which you can send some data because

play23:40

maybe you want to delete something so

play23:43

obviously you have to pass on some IDs

play23:44

so in that case we can pass on some

play23:46

payload what is payload nothing it's

play23:48

just data fancy name to call the data so

play23:51

this is what we have now once we have

play23:52

this all we have to do is how will I add

play23:56

some of the to-do's that's the million

play23:58

dollar question okay in order to do so I

play24:01

have to provide an ID okay how will I

play24:03

get the ID a super simple nanoid will

play24:05

give it to me how will I store the text

play24:08

here is my text and text can be

play24:10

extracted from action dot payload I'm

play24:14

not using any text I'll be just directly

play24:15

providing an object but if you are

play24:17

providing name object and all of that

play24:18

I'll do that I'll not use this one I'll

play24:20

just go with this one okay do we have a

play24:23

comma why are you having an issue

play24:24

expecting a semicolon why are you

play24:26

expecting a semicolon here it is okay

play24:29

why are you expecting

play24:32

okay

play24:33

this is generating add to do should be

play24:36

all good okay

play24:37

I don't know why this is having an issue

play24:40

let me quickly check that why this guy

play24:42

is having an issue

play24:44

all right my bad my bad and let me just

play24:46

fix this uh so action to do we actually

play24:49

did it a little bit wrong so my bad my

play24:51

bad just scrape it off just scrape it

play24:53

off so coming back again so how we are

play24:56

going to add the to-do I probably was

play24:58

thinking ahead of me that's why okay

play25:00

let's scrape it for off again so how

play25:03

we're going to add to do to do takes

play25:04

help from the state to know what is

play25:06

there already in the store and some

play25:08

action and through the action we can

play25:10

pass on some data we can pass on some

play25:11

information with it now in order to add

play25:14

the things what I need is I need to

play25:16

create an object a single to do that

play25:19

single to do can be pushed on to an

play25:21

array what array the array which is to

play25:24

Do's that's all we have to do so let's

play25:25

create a single object so const to do

play25:28

this is a single object this is a single

play25:31

object what does this single object

play25:33

includes this single object includes

play25:35

I'll just first remove this this single

play25:37

object includes two thing a unique ID as

play25:40

well as

play25:41

yes you got that you got that right the

play25:43

payload the information what to do we

play25:45

are storing so let's just go back here

play25:47

ID nanoid and then the text which is

play25:51

going to be action dot payload that is

play25:53

it but right now we have just created

play25:55

the to do we have extracted the

play25:57

information from action we haven't

play25:59

actually used the state to push it into

play26:02

the to Do's so all of this initial state

play26:04

is actually stored or somehow linked

play26:07

with this state the moment you say that

play26:09

hey I'll be doing this estate and who is

play26:11

doing all this Redux yeah Redux behind

play26:14

this thing or behind the scene since you

play26:17

marked it as reducer automatically will

play26:19

inject this entire State the global

play26:21

variable into this state and now all you

play26:24

have to do to access this is now your ad

play26:27

to do is this constitute is ready so

play26:30

let's just go back and simply push it

play26:32

that's all so I'll be saying hey this is

play26:35

the method this is constitute so let's

play26:37

just go ahead and say hey state in this

play26:39

to Do's push to do

play26:41

that is it told you it's really simple

play26:44

that how we actually do this I even do

play26:47

not have to worry with the classic old

play26:50

saying of the Redux that never mutate

play26:52

your state I don't care about it

play26:55

automatically this Redux toolkit take

play26:57

care of that thing so in case you are

play26:59

coming from the background which

play27:00

somebody who knows about the Redux I

play27:02

don't take care of this now

play27:04

so how simple is this all right so uh

play27:07

let's just try to add one more and I'll

play27:09

leave couple of more for your

play27:11

information or for your practice as well

play27:13

I'll just go ahead and say hey let's

play27:15

just go ahead and add one more which is

play27:17

removed to do again what we have to do

play27:19

is simply a method I'll adjust the

play27:21

revision

play27:22

what does this method has it has an

play27:24

access to State it has an access to the

play27:27

action through the action I get the

play27:28

payload so how can I remove this in

play27:30

order to remove this obviously in the

play27:32

action you might be sending me the ID of

play27:35

that to do so that's pretty easy

play27:36

although there is a suggestion really

play27:38

nice suggestion but let's go ahead and

play27:40

make it a little bit easier and do

play27:42

something which we usually don't do

play27:44

let's just go ahead and directly say

play27:45

state DOT to do's and in this I'll just

play27:49

say state DOT to Do's filter filter out

play27:51

on each element and whenever you see

play27:53

that create a new array in which don't

play27:56

include the ID that you are passing me

play28:00

how simple it is I don't even care that

play28:03

whether my state is being manipulated I

play28:05

don't even come up come back here in the

play28:07

earlier days I used to come something

play28:08

like this hey they're going to be a

play28:10

state so I'll be just getting a new

play28:11

state and then we'll be using triple dot

play28:13

I don't do any of that now all these

play28:16

things are gone

play28:18

these are the things of the past I'm

play28:19

super as you can see I'm super super

play28:21

happy and excited about this uh simply

play28:24

you can go ahead and add more things

play28:25

like update and all of that and all

play28:27

those classic saying never mutate your

play28:29

state I don't care I don't care okay uh

play28:33

so I hope you have enjoyed this that how

play28:34

we create the slices now there are a

play28:37

couple of more things that you have to

play28:38

do in this slice itself okay first of

play28:41

all you have to export a few things so

play28:43

first we're going to do is export const

play28:45

all the methods that you have created

play28:47

like add to Do's remove to Do's you need

play28:49

to actually export them as actions

play28:51

because one more time let's go back on

play28:54

to uh the browser here so as I told you

play28:57

that reducers will be talking to store

play28:59

using dispatch but we also learned that

play29:03

all the things that we are doing this

play29:04

action.payload

play29:05

yes this is also important so we'll be

play29:08

using them later on right now I'm not

play29:09

telling you where we'll be using it how

play29:11

we'll be using it but just all the

play29:12

methods that you create here all the

play29:14

reducers you created you need to export

play29:16

it and by the way this whole working

play29:18

this whole functionality all of these

play29:20

things you can move them into separate

play29:21

file and all of that there is no big

play29:22

deal there okay moving on you have to

play29:25

export one more thing which is export

play29:29

X export

play29:32

default will be using a default here if

play29:35

you wish you can use to do slice.reducer

play29:38

so we'll be we are actually exporting

play29:40

the each methods which are there in the

play29:42

reducers as well as we are actually

play29:44

exporting the entire reducer as well and

play29:48

this brings a question that hey why are

play29:50

you bringing this entire uh slice and

play29:53

the reducer as well because

play29:55

this thing this here last line the line

play29:58

number 28 this is something that needs

play30:01

to be wired up with the store yep so

play30:04

let's go back on to our store store here

play30:07

and we need to wire this up notice here

play30:09

we were mentioning these reducers as

play30:10

well here so what I'm going to do is I'm

play30:12

going to go ahead and say import to do

play30:15

radio what did we call it as

play30:19

to do slice and we are actually uh

play30:23

we'll be importing that as a to do

play30:26

reducer feel free to call it anything

play30:28

and we'll be importing it from the

play30:30

features to do and to do slice okay once

play30:34

I have imported this because this is my

play30:35

reducer if you remember this these are

play30:37

individual methods but reducer is this

play30:40

whole thing this whole thing my store

play30:42

should be aware of this so I can just go

play30:45

back here now and can say hey I don't

play30:48

have if I would be having this as an

play30:50

object or I would have many which I'll

play30:52

show you in the project the bigger

play30:53

project as well but right now I can just

play30:55

go ahead and say to do reducer

play30:57

okay that's it my store is now ready

play31:01

my store is now ready and it will be

play31:03

reflected very soon in the dev tools as

play31:06

well but this is all good now if I go

play31:08

back and check it out this my feature

play31:10

list is also ready now at least my

play31:13

functionality part is extracted and any

play31:15

of my component can actually go back and

play31:17

ask this state this to do he can reach

play31:20

out to that directly of course it has to

play31:22

use the method as well to actually reach

play31:25

out that we just saw this use selector

play31:27

so it has to use that method but it can

play31:29

actually Reach Out directly not only

play31:31

that if any component needs to add

play31:34

things or remove things it can also do

play31:36

this they can also use this use dispatch

play31:40

any point of time and since these

play31:42

methods are also being exported I can

play31:44

import these methods and can just use

play31:47

use dispatch and that use dispatch using

play31:50

these reducers will talk to my store

play31:53

how simple how convenient this is okay

play31:56

so this is the basic overview of all the

play32:00

things that we have and again we don't

play32:02

have to do any kind of mounting we don't

play32:04

have to do any kind of a wrapping or

play32:06

anything like that we'll be just going

play32:08

ahead directly and writing our

play32:10

components itself so now let's go ahead

play32:13

and write our components which will be

play32:15

just an input box a button just like

play32:17

that so that's Basics let's go into that

play32:19

all right so I was just sipping some

play32:21

iced tea you need some break after such

play32:23

a long video okay so now we are back on

play32:26

to the situation we have learned how we

play32:28

can create a store we have learned how

play32:29

we can create a reducer we also have

play32:31

learned how we can export the reducer so

play32:33

that our store knows about it also we

play32:35

have exported all the individual method

play32:37

out of the reducer so that I can use

play32:39

them anywhere I like so far this is the

play32:41

status now let's see one by one how we

play32:44

can actually improvise over it and make

play32:46

our Learning Easy so I'll close this

play32:48

I'll close this

play32:49

now basically you don't need to do much

play32:51

and that is the best part now go ahead

play32:54

and do your regular job like creating

play32:56

components that's one of our job let's

play32:58

create a folder and I'll create a

play33:00

components inside this I'll create the

play33:03

very first component so I'll break it

play33:05

down into two parts because in this

play33:06

entire application we have been focusing

play33:08

on just two things add the things remove

play33:10

the things we are not focused on updates

play33:13

and all that you can try them on your

play33:14

own because once you know how the

play33:16

how the deletion is done you know how to

play33:19

carry an ID with you and can perform an

play33:21

updation as well because you don't have

play33:22

to worry about the state mutation just

play33:24

do randomly how you do it okay first

play33:27

thing let's see that how we can add a

play33:30

to-do because in the addition part we

play33:32

will learn just one portion individually

play33:34

that in the ad I just need to collect

play33:36

some data and send it so how can I send

play33:39

it to the store I have to use a use

play33:41

dispatch that's all in my mind nothing

play33:43

else okay I'll right click and create a

play33:46

new file and I'll call this one as what

play33:48

should we call okay where did you go

play33:50

where did you go no please don't go

play33:52

anywhere Okay add to do so let's just

play33:54

call this one as add to do dot JS there

play33:58

we go uh rfce react function component

play34:01

export sounds good okay

play34:04

obviously we'll be tracking the states

play34:06

so uh we'll be saying use a state just

play34:10

give me that that's all Basics that's it

play34:12

now the interesting part from here that

play34:15

starts is how can I collect some data

play34:18

and send it to that okay if I am well

play34:21

aware and well versed in the react

play34:22

getting the data from the form and

play34:25

putting in the U State no big deal no

play34:27

big deal but collecting the data after

play34:30

from the state to sending in the store

play34:32

that's a new knowledge okay how can I do

play34:34

that first thing we have already learned

play34:36

that you need a use dispatch use

play34:38

dispatch that will be coming up from

play34:40

react Redux it doesn't come from the

play34:43

Redux toolkit it's a wiring thing yeah

play34:45

that's where it comes from and also

play34:48

since I'll be sending this data I need

play34:51

some method to do it where is that

play34:54

method where is that controller no I'm

play34:56

not going to write a controller just

play34:57

here in this component because I don't

play34:59

do that yeah that's exactly where you're

play35:01

absolutely correct that I need a reducer

play35:05

for that and that's exactly the reason

play35:07

why we actually went up into this

play35:10

features in the slice and exported them

play35:12

individually yeah now you're getting it

play35:14

I'm super proud of you all right so

play35:17

let's just go ahead and say import add

play35:19

to do Redux and action so

play35:22

okay we didn't actually brought them in

play35:24

the actions did we

play35:26

to do slice dot action so come on man

play35:29

you're doing uh and we won't be bringing

play35:32

it up here is it going to come from here

play35:34

uh probably not so we'll be just saying

play35:37

add to do it will be coming up from the

play35:38

features to do and this uh to do slice

play35:43

so let's just say features this is

play35:46

really bad sometimes Auto suggestions

play35:47

are really really horrible so we'll be

play35:49

saying features and from to do and to do

play35:52

slice

play35:53

uh we don't need to say dot actions here

play35:56

we'll see that how we can actually make

play35:58

it a little bit easier for you for the

play36:00

actions and all that part uh I'll come

play36:03

back onto this one a little bit later

play36:04

right now let's just have this okay so

play36:07

two important information is with us use

play36:09

dispatch which will be using this ad to

play36:11

do and we'll be getting this okay next

play36:13

up is how can I actually have this ad to

play36:16

do for this now the things are super

play36:18

simple first of all control your inputs

play36:20

so let's just call this one as cost and

play36:22

let's just call this one as input

play36:24

suggestions no suggestions

play36:26

set input and will be keeping the status

play36:28

empty as of now then you have to use

play36:31

this use dispatch hook this is how you

play36:33

use it cons dispatch use dispatch so

play36:36

that we have extracted it okay now we

play36:38

have to create a method but hitesh you

play36:40

said we don't want to create a method

play36:42

yes you don't create a method to update

play36:44

it but you create a method so that you

play36:46

can collect the information uh wrap it

play36:49

up and send it to the Handler which is

play36:52

going to be the ad to do so for this we

play36:54

say add to do Handler just like this and

play36:57

what we're going to do is first and

play36:59

foremost let's close this so it doesn't

play37:00

yell at me we want to prevent the

play37:02

defaults so event dot prevent

play37:05

suggestions no suggestion prevent

play37:07

default what after that nothing you

play37:10

simply dispatch this is your ad to do

play37:13

and in the add to do all you have to do

play37:15

is just pass on all the information that

play37:17

you want to pass on all the information

play37:18

that you'll be passing on is actually

play37:20

will be taken here in the text format

play37:22

action dot payload that is it that is it

play37:25

that's all it takes in this case I'm

play37:28

going to just directly say that hey you

play37:29

directly take this input and that's it

play37:31

be happy with it whatever we haven't

play37:33

done any kind of sanitization or

play37:35

something but once we are done with this

play37:37

obviously we want to refresh the input

play37:39

so that's basic that's uh so I'll be

play37:42

saying set input as empty that's it

play37:45

now whatever goes in here that's just a

play37:48

CSS so I'll be just directly copying and

play37:49

pasting it from the notes that I have

play37:51

because it doesn't add any value it's

play37:54

just a form I'll explain you no worries

play37:56

I pasted it because there's so many of

play37:58

the class name and just keep on writing

play38:00

this class name it's not a Tailwind

play38:01

class it's just a simple all we are

play38:03

doing is we are having this value linked

play38:06

wired up with the state which is input

play38:08

and on the change we are actually using

play38:11

the set input event.target value so we

play38:13

are actually putting this up and as we

play38:16

are saying type submit one thing we have

play38:18

to change is this method name because it

play38:20

was suggested to me so no big deal we

play38:22

can just simply say add to do Handler

play38:24

and that's it and that is it so I hope

play38:27

now you can understand there is no prop

play38:28

drilling I am not sending it anywhere

play38:30

I'm just going through with two things

play38:33

and this is so much repeatable get your

play38:36

dispatch and get the method where you

play38:38

want the functionality to happen that's

play38:40

it rest all the functionality is my in

play38:42

my slice yep that is why this is called

play38:44

a slice I call this as controller as

play38:47

well because that's exactly what it is

play38:48

doing and I don't have to keep how many

play38:50

values were there already should I be

play38:52

updating do I need to get a fresh State

play38:54

nada nothing at all all okay now we have

play38:58

actually seen that this is how it is

play39:00

done

play39:01

another portion of this tutorial which

play39:03

is remaining is okay I know how can I

play39:06

send the data and I probably can send

play39:08

this data as to Do's I also can send

play39:10

data for more things I'll walk you

play39:12

through with the deletes and all of that

play39:14

as well by the way there is a delete as

play39:15

well sorry forgot to actually mention

play39:17

that from the notes uh by the way in

play39:19

case you notice this is the ad to do

play39:21

I'll walk you through with the delete as

play39:22

well we'll be working on the delete as

play39:24

well but coming back coming back now we

play39:26

have seen that how can we actually go

play39:28

ahead and use that to do and send the

play39:30

data now we also need to learn how we

play39:32

can read the data from the store again

play39:34

it's also almost like a two-step process

play39:36

that's it okay for this we'll be

play39:38

creating a new component new file and

play39:40

let's just let's just let's just call

play39:42

this as to Do's because that's where

play39:45

major leads will happen to dos.js

play39:47

rfce react functional component yeah

play39:50

that's that's all okay first and

play39:53

foremost what do we need to read from it

play39:55

if you have if you remember from the

play39:57

notes use selector is the one which will

play40:00

be responsible for reading from it okay

play40:01

so let's grab it no problem we'll be

play40:04

saying uh use selector from react Redux

play40:07

there we go this is it we'll be applying

play40:10

the delete part here as well but I don't

play40:12

want you to confuse with it right now we

play40:14

are focusing just on one portion how to

play40:16

read the data that is it that is my goal

play40:19

okay how can I read the data

play40:22

all I have to do is to read the data is

play40:24

first of all let's come up here and all

play40:27

I have to do is use selector this use

play40:30

selector has the axis of the state and

play40:33

by the way this use selector looks like

play40:35

this which has a callback it goes like

play40:37

this

play40:38

just like this and in here you have an

play40:40

access to State Redux injects it I don't

play40:43

okay if I have access to this state I

play40:47

can go ahead and say hey State just go

play40:51

ahead and there would be many there

play40:52

would be many to Do's here so I'll just

play40:54

first go back here and actually make

play40:56

things a little bit easier for you so

play41:00

inside this I'll be just saying ah this

play41:03

initial State this is the one that I

play41:05

want to track and this is the one that I

play41:08

want to grab okay so rest of things

play41:11

looks easy it looks good okay let me go

play41:14

ahead and just bring this back

play41:17

all right hey back okay so we were

play41:20

talking about this use selector now

play41:22

before we actually talk about this use

play41:23

selector I'll walk you through with that

play41:25

and you selected is nothing it just is a

play41:27

method a simple method which actually

play41:30

takes a callback in which you have an

play41:31

access to state but what the state is

play41:33

and what's happening so far things can

play41:36

be a little bit confusing at this point

play41:37

so what I'll do is I'll actually remove

play41:39

all of this this view selector I'll come

play41:41

back on to this one don't worry we have

play41:42

to write this obviously but one thing

play41:44

that I want to see is now that we have

play41:47

seen so far if I go back on to this

play41:50

diagram that we saw is that all of my

play41:53

components are actually aware of this

play41:55

store how that's even possible just you

play41:58

have created a file and is Redux

play42:00

injecting some magic no that's where you

play42:02

have to do some of the magic that you

play42:05

can actually go on to your index.js or

play42:07

wherever is your root file or root

play42:10

folder is and here you can actually have

play42:13

a wrapper so I'll just add this one at

play42:16

the very top so I'll just go ahead and

play42:18

say I need a provider

play42:20

yes that's exactly the name provider

play42:23

that comes from

play42:25

from react Redux so this is the provider

play42:27

how do we use this provider actually

play42:29

it's super simple all you have to do is

play42:31

this is our app wherever your top level

play42:33

of the app is make sure you actually

play42:34

wrap this provider on top of it so this

play42:37

is all you have to do is provider and

play42:39

you have to pass on a store and then

play42:41

simply go ahead and add provider just

play42:43

like that that's it this is all what we

play42:46

have to do but again looks like there is

play42:47

a problem it says jsx element provider

play42:51

has no corresponding closing tag yes

play42:53

there should be a closing tag there we

play42:55

go all right now in this provider we

play42:59

actually mentioned this store and that's

play43:00

why I say that usually you only have one

play43:02

store uh yes there could be exception

play43:04

very very rare exception but since I've

play43:07

seen it that's why I'm saying there

play43:08

could be an exception but now there is a

play43:10

store okay so the store is there put

play43:13

next now is the time that we actually

play43:15

see our application that how it is there

play43:17

so I'll just close this and npm start

play43:20

run and there we go and seems like

play43:23

nothing it says a store is not defined

play43:25

my bad we didn't brought in the store no

play43:28

big deal no big deal we can actually

play43:29

bring in the store from the app that we

play43:32

created so let's go ahead and say import

play43:34

if I can write that

play43:37

import store from App Store so it should

play43:40

be all good now if I hit a refresh and

play43:44

imported as store is not found in the

play43:46

App Store

play43:47

inside the app store.js

play43:50

we actually brought in the store

play43:54

did we forgot to even export that no now

play43:57

it's working okay now the interesting

play44:00

part is you can inspect this and by the

play44:01

way you have to install this Redux Dev

play44:03

tools these are super helpful and super

play44:06

important and you can find them just

play44:07

here in the Redux now if I go into the

play44:10

Redux I can actually see these actions

play44:13

diffing and state if I click on the

play44:15

state this is where my to Do's are

play44:18

yeah this is the most important part

play44:20

that I have my to-do's here and this is

play44:23

one of the most important thing that now

play44:25

since my entire application is aware of

play44:27

it I can just go ahead and read from it

play44:29

not only that we'll do some magic here

play44:32

let's just go into the slice to do slice

play44:36

and what we'll be doing is we'll be

play44:38

injecting an object here the first part

play44:41

is going to be ID we'll be calling it as

play44:43

one and we'll be adding a text uh we'll

play44:46

be saying hello we don't have completed

play44:48

and all of that so we'll be just saying

play44:49

hello just like that

play44:51

and save that

play44:53

let's see what happens to our store now

play44:55

as we can see that this is is there so I

play44:59

can go ahead and extract my to-do's at

play45:01

any point of time I can just go ahead

play45:02

and call state.actions and it's

play45:04

available to me that is the fun part

play45:07

okay let's go back up here now I'll go

play45:09

into to-do's and I'll say hey I want to

play45:11

actually use it so how can I go ahead

play45:13

and actually use it again same thing we

play45:16

have this use selector so let's go ahead

play45:18

and use selector it's super simple we'll

play45:20

be saying use selector there we go it

play45:23

has a state which can get state DOT to

play45:25

do's and we can hold that in some

play45:27

variable let's just call this one as to

play45:29

doosh and there we go obviously we would

play45:31

love to do a console log here as well of

play45:34

the to-do's that what's actually is

play45:35

there so that we can see it says logs an

play45:38

empty array this is again an extension

play45:40

that I'm using that I wanted to have

play45:43

this but why this is actually logging me

play45:45

an empty array

play45:47

I know that in my initial State and this

play45:50

is also saying that hey you are having

play45:51

all these things going on in here now

play45:54

there's an interesting thing to do and

play45:56

if I go ahead and say dot to Do's now if

play46:00

I save this

play46:02

and go back and try to do a console log

play46:05

and let's hit a refresh here

play46:09

and we should be getting some things up

play46:11

here

play46:12

okay so not this one I didn't expect

play46:15

that

play46:16

okay looks like some things are

play46:18

interestingly going up here let me

play46:20

quickly check that that where I'm making

play46:22

a mistake here yes definitely I'm making

play46:24

it we're back after a crash and thank

play46:26

goodness the video recording got saved

play46:28

anyways yes I fixed out the bug as well

play46:31

by the way I'll walk you through that

play46:32

how I actually fixed it so uh turns out

play46:35

the issue was that I was actually never

play46:37

loading this to do so the to-do's that

play46:40

we were having I was never loading it at

play46:42

all so what I need to do is simply go

play46:44

into app.js and I mounted this to Do's

play46:46

here that's that's all I did and by the

play46:48

way I'll just remove this header and

play46:49

everything so that we just have the

play46:51

to-do's up here and we have this to do

play46:53

input add to do as well so let's go

play46:55

ahead and add that component as well

play46:56

since we are here already so we'll just

play46:58

go ahead and say add to do as a

play47:00

component that's it so that at least we

play47:03

can see all the things going on so there

play47:04

we go we have this add to do's and we

play47:06

have all the to-do's being mentioned up

play47:08

here uh the thing the interesting part

play47:10

about this I'll reload the application

play47:12

is the problem that we were facing is

play47:15

inside the to-do all we were doing is

play47:17

use selector by the way don't go with

play47:19

the X9 because I hit a reload multiple

play47:22

times so it's giving me those reloads

play47:23

but again we were able to extract this

play47:25

just with the saying state DOT to Do's I

play47:28

was able to do this because I looked

play47:30

into the Redux and I said Hey in the

play47:33

state how many values are there it's

play47:35

just one to Do's so state DOT to do's

play47:37

and inside this all my values are there

play47:39

so I'll just say just let's store them

play47:41

into a variable so I call this as to

play47:42

Do's now all that's remaining is to Loop

play47:44

through that and that's really really

play47:46

basic so I'm going to go ahead and just

play47:47

show you once here that we can actually

play47:49

go ahead and do that now then we'll do

play47:51

that in a easier and better format and

play47:53

all of that so we'll just go ahead and

play47:54

inject just like this and probably we

play47:57

should not do this

play47:59

we should first wrap this up inside this

play48:02

and let's just go ahead and extract this

play48:05

cut this out paste it up here and then

play48:07

we can go ahead and inject this then we

play48:09

can go ahead and say hey to Do's all you

play48:12

have to do is just map through it and

play48:15

while mapping through it we can simply

play48:16

go ahead and say Hey I want to map

play48:18

through each individual to do I'll be

play48:20

returning a

play48:22

a component just like this and once I'm

play48:25

actually going ahead looks like there is

play48:27

an issue this is to do returning there

play48:30

is one more

play48:31

Auto suggestions hate them sometimes and

play48:35

all we have to do is simply get an

play48:37

paragraph or an ally I'll right now grab

play48:39

just a div okay that's nice Auto

play48:42

suggestion love them sometimes since we

play48:44

have uniquely added the identifier with

play48:46

the Redux nanoid to do uh the uuids then

play48:50

it's much more easier to do it and if I

play48:51

go back here we go the hello is there

play48:53

which we added up there so that's super

play48:55

super easy now if you want to do it in a

play48:57

much better way so that it looks really

play48:59

nice so then in that case I'll just go

play49:01

ahead and give you the code that we

play49:04

wrote so I'll just go ahead and add this

play49:06

just like this

play49:08

and it's doing basically nothing all of

play49:10

this so right now I need to actually

play49:12

remove some of the things because this

play49:14

button shouldn't be working as of now

play49:16

because we haven't discussed that okay

play49:18

and this part should also be removed

play49:21

okay we'll come back on to this part as

play49:23

well

play49:24

okay now we are doing this all of this

play49:26

this is all doing good hit a refresh and

play49:31

it says hey there's on click

play49:34

I'll remove the unclick

play49:36

okay save this and there we go we should

play49:39

be changing the text to text White

play49:43

where the text is

play49:45

and this should get some class

play49:48

name and we'll be saying text Dash White

play49:51

all right so there we go now I hope you

play49:54

are able to see it it's looking really

play49:55

bad I haven't added much of the things

play49:57

but yeah so notice here you now actually

play49:59

are able to see all of the things which

play50:01

are happening now if I go ahead and add

play50:03

another to do so I'll just go ahead and

play50:04

say another to do and I'll just add this

play50:07

and notice here it says add another to

play50:10

do hello and all of that so this is

play50:12

again getting looped through and all of

play50:13

that so yes there is an issue for that

play50:15

react strict mode in the production mode

play50:16

and whatnot but this is really really

play50:18

nice that I can go ahead and add one

play50:20

more click on this ad it actually runs

play50:22

the things again here for me we'll

play50:24

resolve this one as well but by the way

play50:26

this is looking already so good and so

play50:28

nice that we are actually able to do

play50:30

this okay coming back on to this part uh

play50:34

where we having this selectors and to

play50:36

do's and all of that so let's go ahead

play50:37

and resolve this part as well

play50:40

all right so it was the easy fix what I

play50:42

was doing is actually not properly

play50:44

looping through it since just to show

play50:46

and demonstrate and explaining all these

play50:48

things I was just putting the keys

play50:50

somewhere in the bottom which is not a

play50:52

good thing so I just need to put the key

play50:54

which the element is looping through

play50:55

which is this list item so I added the

play50:57

key here and it fixed all the things all

play50:59

right so moving further what do we

play51:01

notice here what is happening okay so we

play51:03

saw that it's really actually easy if I

play51:06

go ahead and remove this console log now

play51:07

so that we understand the things

play51:08

actually in order to query from my state

play51:13

or my Global state or my store it's

play51:16

actually much more easier than

play51:17

dispatching even in the dispatch it was

play51:19

a two phase process here it's just a one

play51:21

phase process have the use selector use

play51:25

selector is a method which gives you

play51:26

access to the state which is an object

play51:28

and just grab whatever you need from it

play51:31

state DOT to Do's state DOT token state

play51:33

DOT uh projects maybe whatever you need

play51:36

you just simply put a dot and get an

play51:37

access to it once we have an access to

play51:40

this just simply Loop through this make

play51:41

sure while looping through you know that

play51:43

if it is not empty if the array is empty

play51:46

you handle all those cases that's super

play51:48

easy part okay one thing that is still

play51:50

missing in the part is to show you

play51:53

that okay I know that this is going nice

play51:56

here I can just go ahead and add a test

play51:57

here it works nice hello and test I have

play52:00

seen that how can I send the data in the

play52:03

store cool if I right click here the

play52:05

store is getting updated all the time

play52:06

inspect and go into my Redux I check the

play52:11

to-do's there is a zeroth item there is

play52:13

a first item which is unique IDs and

play52:15

test okay that that's working fine I

play52:17

have also seen that how can I actually

play52:19

extract the data from the dispatch use

play52:22

reducer dispatch all good all good but

play52:25

how can I actually mark this as delete

play52:27

because this is a combination now and

play52:29

this is super easy and if you have so

play52:31

far paid attention at least in the part

play52:34

where we had this ad to do this is

play52:37

exactly the same process what do we do

play52:39

we bring the method we simply use use

play52:42

dispatch so let's go ahead and copy this

play52:44

exact same functionality so copy this go

play52:47

into the add to Do's let's bring the

play52:49

functionality this time do we want to

play52:50

add reduce no this time I don't want to

play52:53

do add to Do's I actually want to have a

play52:55

delete to do or did we call it as remove

play52:57

to do yeah remove to do so I have my

play52:59

method I have my use dispatch okay but

play53:03

how do I use use dispatch let's cheat a

play53:05

little bit let's find how we did it in

play53:07

the air to do in the add to do we simply

play53:09

said const dispatch dispatch all right

play53:12

all right let's go ahead and copy this

play53:14

let's go move here and there we go

play53:17

dispatch that's it now whenever I want

play53:19

to use this remove to do I have to use

play53:21

it via the dispatch okay wherever I want

play53:24

to use it in the button itself where it

play53:26

says all this rounded and all of that

play53:28

what not this is the button what should

play53:30

I do on click so on

play53:33

click there we go and all you have to do

play53:36

in this on click is simply call the

play53:38

dispatch that is it but we cannot call

play53:40

the dispatch directly because we have to

play53:42

pass on some method because hey if you

play53:44

remember the classic 101 if I call the

play53:46

dispatch here it will be passed on as a

play53:48

reference but if I want to pass on some

play53:49

values I have to use this I cannot do

play53:51

this directly so in order to do this I

play53:53

have to use a callback here so this is

play53:55

my callback

play53:56

there we go I have a dispatch now in

play53:58

this dispatch what is the method that

play54:00

you want to use remove to do this is a

play54:03

method and what does this method takes

play54:04

the ID so I'll just go ahead and say hey

play54:07

to do since I'm looping through already

play54:08

through it and I'm calling it as to do

play54:10

I'm going to Simply go ahead and say to

play54:13

do dot ID and that's it and do I press

play54:17

the tab no I don't press the tab it just

play54:20

messes it up I hate this

play54:24

and probably okay now we need to count

play54:27

them come on

play54:28

yeah that's good now okay

play54:31

save this notice here how easy it is

play54:34

dispatch the reducer that's it all done

play54:37

so it makes your life so much easier

play54:39

let's go back on to this part and now if

play54:41

I try to delete the test test is gone

play54:43

it's actually gone from the store so all

play54:46

the thousand places where this was being

play54:48

displayed that's gone that's gone from

play54:51

the reference and yes this is it let me

play54:54

just give you a summary of this in case

play54:56

you want that so the idea behind having

play54:59

a Redux and the Redux toolkit now is

play55:02

things first of all are very simpler the

play55:04

step one is to create a store we created

play55:06

a store we simply said that hey I'll

play55:08

give you a reducers I don't know what

play55:09

reducers are right now but I'll give you

play55:11

in at some point of place and one thing

play55:13

that we actually learned at the very

play55:14

last is all of your components should be

play55:16

no should be aware of the store so

play55:18

that's why we go on to the index.js and

play55:21

simply wrap your entire application with

play55:23

the provider that's a must have to do

play55:25

with this so that's the step one and two

play55:26

a wrap create a store and then wrap

play55:29

everything with the provider here that's

play55:31

simply 101 we did that the next step

play55:33

comes up is to Define your functionality

play55:35

that we call as slices slices not just

play55:38

functionality now it's a much bigger of

play55:40

an object how do we create the slice the

play55:42

step one is to Simply first and foremost

play55:44

declare your initial State how your

play55:46

state will look like when the

play55:47

application will start once you have

play55:49

done this then simply go ahead and use

play55:51

the create slice method which is a new

play55:53

method available inside the Redux

play55:55

toolkit once you have this you have to

play55:57

provide couple of things provide a name

play55:59

to your slice because there can be many

play56:00

slices provide a name like to do good

play56:02

name provide it an initial state which

play56:05

you have declared just here this is just

play56:06

an object and then provide a list of the

play56:09

reducer as many reducers as you have

play56:11

just provide that most important thing

play56:13

is export your reducer out of this to do

play56:16

slice that whatever the to-do slice you

play56:18

are creating export this reducer this

play56:20

will be used in store also export all

play56:23

these individual method because wherever

play56:25

you are going to use the dispatch these

play56:27

individual methods will be useful now we

play56:29

know the picture okay once this is done

play56:31

that is it that is it now we have to

play56:34

learn how we can use it we first

play56:35

actually learned the use cases in the

play56:38

attitude so how we can add to add the

play56:40

things first of all we need to talk to

play56:41

the store and we need to send some data

play56:44

to it so obviously we'll be first step

play56:46

one is to use dispatch and then what

play56:48

functionality you want to use use

play56:50

dispatch is simply just create a

play56:51

dispatch out of use dispatch and then

play56:53

simply say dispatch an action which is

play56:56

to do and take this data with you and

play56:59

we'll be able to extract this data

play57:00

simply in the payload we know that

play57:03

and how we can actually extract the data

play57:05

this was sending the data in order to

play57:07

extract the data it's simple process use

play57:10

the use selector use selector has an

play57:12

access in the Callback of this state and

play57:16

this state will actually give you the

play57:18

state DOT reduce or state DOT token or

play57:20

state DOT authorization whatever is

play57:21

there everything is available to you

play57:23

this is really a lifesaver so this is it

play57:26

this is your kind of uh you can say a

play57:29

crash course on the Redux toolkit I've

play57:32

tried to make it extraordinarily simple

play57:34

so that when we actually make that

play57:37

next.js app with the app right we can

play57:39

actually take advantage of this state

play57:41

management and the life will be so much

play57:43

easier this video recording was with a

play57:46

lot of hiccups a lot of phone calls uh

play57:48

crashed it once but thank goodness the

play57:50

recording was saved but I think we

play57:52

finally made it it was a good job if you

play57:55

appreciate such kind of videos there's a

play57:56

lot of effort that goes into them please

play57:58

please please just leave a comment an

play58:00

emoji would be really nice or just a

play58:02

thanks it would be really happy all

play58:04

right that's it for this video let's

play58:06

catch up in the next one

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Redux ToolkitState ManagementReact ApplicationsCode TutorialWeb DevelopmentNo-Nonsense GuideRedux Crash CourseJavaScript LibrariesCentralized StateProp Drilling Solution