React Redux Tutorials - 16 - Reducers

preview_player
Показать описание

📱 Follow Codevolution

Reducers in React Redux
Рекомендации по теме
Комментарии
Автор

thankyou, you deserve much much viewer, this is the best!! you helped me with my probation on my first career on tech. you have saved me

rizqyhbb
Автор

Thank you for effort for such an amazing content and detailed explanation.

samirguliyev
Автор

at 2:11 when i am writing ...state, numberOfCakes it is showing error in state place in vscode please help me
import { BUY_CAKE } from "./cakeTypes"

const initialState={
numOfCakes:10
}

const cakeReducer=(state=initialState, action)=>
{
switch(action.type)
{
case BUY_CAKE: return
{
...state,
numOfCakes: state.numOfCakes-1
}
default: return state
}
}

export default cakeReducer

tmahesh
Автор

good luck, INDIA IS RISING. DO GOOD TO THE WORLD...

costagmc
Автор

Using reducer we are directly changing the initial state value without using setState method which is contradicting to what you said in the previous react videos.

manastripathi
Автор

Why do we need the cakeActions.js file you didnt use it

karamsahoo
Автор

Maybe it would have been a good idea this reducer to contain a payload with the number of bought cakes.

ДаниелДианов
Автор

How can i set initial state from child component please help....

mridulhoneysharma
Автор

why its took so complex steps to do simple task

aravindatr
Автор

It works on decrement(when buying cake the number of cake decrease) but when trying to increment it malfunctions. Suppose numOfCakes-10 and when we buy it gives us 9 but when incrementing the number instead of giving 11 it gives us 101, 1011, 10111, 101111... Why? is it an intention bug?

sangtonsing
Автор

First of all thank you for making such amazing video in a structured manner.

So i have one doubt is it necessary to pass the state parameter to the reducer function and what will happen if we don't pass the state parameter.

subhamkumarsahu
Автор

hi sir can you make some series on ngRx/store with angular 7

ashwini
join shbcf.ru