🌈 19 - Thunk with RTK - createAsyncThunk - How to do Async Call with RTK - Redux Toolkit

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 21

  • @nikhilm5651
    @nikhilm5651 2 ปีที่แล้ว +6

    Thanks alot sir.Getting this type of content at zero price is a blessing to us

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว +1

      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.

  • @milanpavlovic8141
    @milanpavlovic8141 9 หลายเดือนก่อน +1

    So beautifully explained

    • @tapasadhikary
      @tapasadhikary  9 หลายเดือนก่อน

      Thanks a lot 😊

  • @KumManish
    @KumManish 2 ปีที่แล้ว +2

    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. 😀😀

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว +1

      Why? And how are you?

    • @KumManish
      @KumManish 2 ปีที่แล้ว

      @@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 🙃

  • @ABUTAHER-wg7gz
    @ABUTAHER-wg7gz ปีที่แล้ว

    is it possible RTK Query inside of asnycThunk?

  • @deepakgupta2084
    @deepakgupta2084 2 ปีที่แล้ว +1

    can you make a one video Redux Saga implement please

  • @Shyam_Mahanta
    @Shyam_Mahanta 2 ปีที่แล้ว +2

    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;
    },
    }

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว +1

      Absolutely, I thought of covering it in the error handling video... But thanks for a heads up, buddy.

    • @Shyam_Mahanta
      @Shyam_Mahanta 2 ปีที่แล้ว +1

      @@tapasadhikary yup waiting for it.😊

  • @nikhilm5651
    @nikhilm5651 2 ปีที่แล้ว +1

    👌👏👏

  • @jubayethossain5382
    @jubayethossain5382 2 ปีที่แล้ว +1

    Are you bengali ? By the way love your video lectures. You showed to the point and very much informative

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว

      Thanks a lot, appreciate. Yes I’m a Bengali from India 😊

  • @RajaduraiKalyanasundaram
    @RajaduraiKalyanasundaram 2 ปีที่แล้ว

    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]
    }
    }

  • @rysmo0
    @rysmo0 ปีที่แล้ว +1

    Just remove the rainbow logo and you shall be great.

    • @tapasadhikary
      @tapasadhikary  ปีที่แล้ว

      Where?

    • @SURYARaj-zg3ys
      @SURYARaj-zg3ys ปีที่แล้ว +2

      @@tapasadhikary in Video title
      is what he is saying

    • @tapasadhikary
      @tapasadhikary  ปีที่แล้ว

      Ah ok 😊😅. Wondering what problem it might cause!!!

    • @SURYARaj-zg3ys
      @SURYARaj-zg3ys ปีที่แล้ว +1

      @@tapasadhikary 🤣