Edtech backend class 4

 whenever their is concept related to data we have to manage that
like in our project called studynotion we required to show the UI based on the different types of user 
different UI for the Instructor and different for the Student.

from where we get information about the user that is --> backend.

we have to manage the state so for that we uses state management library called -- > REDUX.

steps 
1. install the particular package (redux toolkit)
2. create the store 
3. wrapped into provider  :- wrapp app component into the provider as all the state will be treated as global variable,  we have to pass store into the provider
4. create slices
5. add into reducers

what we do in reducers folder :- take all the slices and combine them


if token === null then show login and signup button
if token !== null then show add to cart like features

frontend -> button -> services -> controller

Optional parameter in function --> Order matters a lot 

Comments

Popular posts from this blog

BD Class 4 Data Association

Authentication and autherization class 1