Thanks, Nikhil. I'm glad I can help the dev community with my knowledge. The only help I probably need from the community is they share the work so that others can take advantage too 😊. Thank you for your support.
This is Awesome Tapas sir, It's been a while since we have last met on twitter, I am that Nova Manish guy that you know. I hope you and your family are well and fine. By the way, I have deleted my social media accounts haha. 😀😀
as reducers can also take an object containing reducer functions so does extraReducers. it can be an object with multiple reducer function extraReducers: { [changeTheColor.pending]: (state, action) => { state.loading = true; }, [changeTheColor.fulfilled]: (state, action) => { state.color = action.payload; state.loading = false; }, [changeTheColor.rejected]: (state, action) => { state.color = ""; state.error = "Error Occured" state.loading = false; }, }
Hello Tapas, You're making us understand very easier... Nice video, thanks a lot. Have one question...What if we dispatch from reducer function? Is it okay to do this? import { useDispatch } from "react-redux" import {getData} from './api' const dispatch = useDispatch() const fnReducer = (state=[],action) => { switch(action.type){ case 'FETCH_DATA_RQUESTED' getData(data).then( dispatch({type: 'FETCH_DATA_SUCCEEDED', payload: data}) ) case 'FETCH_DATA_SUCCEEDED' return [...state, action.payload] } }
Thanks alot sir.Getting this type of content at zero price is a blessing to us
Thanks, Nikhil. I'm glad I can help the dev community with my knowledge. The only help I probably need from the community is they share the work so that others can take advantage too 😊.
Thank you for your support.
So beautifully explained
Thanks a lot 😊
This is Awesome Tapas sir, It's been a while since we have last met on twitter, I am that Nova Manish guy that you know. I hope you and your family are well and fine. By the way, I have deleted my social media accounts haha. 😀😀
Why? And how are you?
@@tapasadhikary, Haha that's a story for getting into life again 😊 by the way I am well and fine, thank u. Dropped a mail to you too 🙃
is it possible RTK Query inside of asnycThunk?
can you make a one video Redux Saga implement please
as reducers can also take an object containing reducer functions so does extraReducers. it can be an object with multiple reducer function
extraReducers: {
[changeTheColor.pending]: (state, action) => {
state.loading = true;
},
[changeTheColor.fulfilled]: (state, action) => {
state.color = action.payload;
state.loading = false;
},
[changeTheColor.rejected]: (state, action) => {
state.color = "";
state.error = "Error Occured"
state.loading = false;
},
}
Absolutely, I thought of covering it in the error handling video... But thanks for a heads up, buddy.
@@tapasadhikary yup waiting for it.😊
👌👏👏
Are you bengali ? By the way love your video lectures. You showed to the point and very much informative
Thanks a lot, appreciate. Yes I’m a Bengali from India 😊
Hello Tapas, You're making us understand very easier... Nice video, thanks a lot. Have one question...What if we dispatch from reducer function? Is it okay to do this?
import { useDispatch } from "react-redux"
import {getData} from './api'
const dispatch = useDispatch()
const fnReducer = (state=[],action) => {
switch(action.type){
case 'FETCH_DATA_RQUESTED'
getData(data).then(
dispatch({type: 'FETCH_DATA_SUCCEEDED', payload: data})
)
case 'FETCH_DATA_SUCCEEDED'
return [...state, action.payload]
}
}
Just remove the rainbow logo and you shall be great.
Where?
@@tapasadhikary in Video title
is what he is saying
Ah ok 😊😅. Wondering what problem it might cause!!!
@@tapasadhikary 🤣