Let’s Learn Modern Redux! (with Mark Erikson) - Learn With Jason

Поділитися
Вставка
  • Опубліковано 12 гру 2024

КОМЕНТАРІ • 65

  • @zhou7yuan
    @zhou7yuan 2 роки тому +43

    What is Redux & context [2:22]
    [14:30]
    Recommend hooks API as default [15:24]
    `connect` difficult for TypeScript [16:31]
    Redux Toolkit [18:16]
    Where to go? [18:36]
    pre-defined templates on create-react-app
    Vite [19:30]
    project start files [21:26]
    dependencies [23:33]
    features folder [25:00]
    features/counter/counter-slice.ts [25:48]
    `createSlice` [27:25]
    `Immer` package within for state updates [32:05]
    redux store [35:20]
    app/store.ts
    configureStore with defaults: [36:10]
    - Redux-Dev-Tools Extension
    - Thunk middleware
    types export [38:06]
    main.tsx [40:15]
    app/hooks.ts [42:40]
    `useAppDispatch`
    `useAppSelector`
    App.tsx [46:30]
    counterSlice.reducers.amountAdded(state, action: PayloadAction) [53:00]
    ---
    Docs: Writing Thunks [56:26]
    `createAsyncThunk`
    createSlice -> extraReducers [59:19]
    ---
    Docs: RTK Query Overview [1:02:09]
    Demo: Dogs as a Service data fetching [1:03:04]
    features/dogs/dogs-api-slice.ts
    `createAPI` [1:06:55]
    store.ts [1:14:20]
    reducer & middleware
    features/dogs/dogs-api-slice.ts [1:17:32]
    export generated hook
    App.tsx [1:19:07]

  • @koko0808008
    @koko0808008 2 роки тому +25

    Oh finally comments are available. This is video is really pure gold to get a good introduction to modern redux. It really helped me last year when i started a new job. Thank you Jason and Mark

  • @nichaphatraithipphikun8098
    @nichaphatraithipphikun8098 Рік тому +4

    This is extremely helpful for a newbie. It's great to see everything from the start with simple explanation to it. Great stuff!

  • @TheReadWellPodcast
    @TheReadWellPodcast 2 роки тому +22

    This video was a game-changer! Thank you, gents.

  • @mqasim7206
    @mqasim7206 Рік тому +2

    I really appreciate these methods! They're straightforward and easy to follow. Thanks

  • @satyaranjannayak1361
    @satyaranjannayak1361 4 місяці тому

    I always had hard times understanding modern redux, thanks to you and Mark, I finally understood the whole base concept. Keep up the good work 👍👍

  • @romanjs4909
    @romanjs4909 Рік тому

    hooks generation is DOPE. I'm in!

  • @yehoriliushchenko4401
    @yehoriliushchenko4401 Рік тому

    such a good quality of content, and that is 2 years ago. You deserve more attention!

  • @mariolazzari
    @mariolazzari 2 роки тому +1

    This video is changing my life: redux toolkit is, nowadyes, the ultimate solution for handling you enitre application. Thanks so much guys!

  • @banalola
    @banalola Рік тому

    One of the best tutorial on redux toolkit. Much appreciated!!

  • @stevenquintana8937
    @stevenquintana8937 2 роки тому +1

    Finally I can understand pretty well redux toolkit

  • @ajithsimon
    @ajithsimon 2 роки тому +9

    Still wondering why you have installed axios! Thought you gonna do something with it instead of RTK Query!

  • @netkrash
    @netkrash 2 роки тому

    I was on the fence about createApi, the documentation is really intimidating but this explains it very well, thank you! this is so useful!!

  • @adobehex6116
    @adobehex6116 2 роки тому +2

    even on my weak computer the installation did not take much time, thank you very much

  • @n.y.synytskyi1118
    @n.y.synytskyi1118 2 роки тому +1

    A great episode, thank Erik and Jason!

  • @hugoforte
    @hugoforte 2 роки тому +1

    Niiiiiice - thanks so much!!=) that was glorious - the short term caching at the end was gold=)

  • @bogdantimchenko4829
    @bogdantimchenko4829 8 місяців тому

    I love it! Thanks, Guys for this video! I had an experience with redux before, then switched to GraphQl Apollo. There are a few similarities between both. But it is good progress for Redux.

  • @danceharborhub
    @danceharborhub 10 місяців тому

    Amazing video, thank you!!

  • @MrKhelkun
    @MrKhelkun 6 місяців тому

    I wonder about naming convention of the reducers and actions: in the video the reducers are named to the past "incremented" & "decremented" in the slice, so forth the actions are named the same. However it would sound more natural to me that the actions to be named "increment" & "decrement". So would you name your slice reducers to the past or present?

  • @claudiutamas79
    @claudiutamas79 Рік тому

    Finally, I understood this! Thanks!

  • @rakeshpk4991
    @rakeshpk4991 Рік тому

    Thank you two. This is very helpful!!!

  • @ryanocampo7465
    @ryanocampo7465 2 місяці тому

    at 50:52 can anyone explain the dispatch usage here? Currently I get prompt that dispatch does not take arguments, line 12 of the click handler function in app tsx in vod

    • @ryanocampo7465
      @ryanocampo7465 2 місяці тому

      EDIT: hooks, I forgot the complete type casting of dispatch, added empty parenth at the end

  • @nikoman71326
    @nikoman71326 4 місяці тому

    this is GOLD!

  • @furciorifa
    @furciorifa 3 місяці тому

    I never imagined that a Jason teach me how to retrieve JSON lol

  • @PeterKellner99
    @PeterKellner99 Рік тому +2

    I'm trying to understand the "optional add on" comment for RTK Query. I looked on the toolkit page and I could not figure out how much the optional add on costs. Is it all open source, or is there a financial model someplace in here to pay for the dev work?

    • @brandon-t7s
      @brandon-t7s Рік тому +1

      By 'you don't pay for it' - he meant pay for it as in you won't increase the bundle size from the import unless you choose to use RTK Query, not with real money haha.

    • @markerikson3383
      @markerikson3383 Рік тому +1

      Hah, I meant "pay" as in "your JS bundle gets larger when you import this" :)
      All the Redux packages are 100% open-source _and_ free-to-use monetarily

    • @TheKeyboardKnight
      @TheKeyboardKnight Рік тому +1

      @@markerikson3383
      I did the same, lol.
      The reason I was searching for a paid version is not only the comment but also that when I use createApi from the "optional add-on" I get typescript error because it returns me an object of type any. When I import it from ""@reduxjs/toolkit/query" I get the Api type of object but the hooks are missing. TS version is 5.1.6 What should I do to get this working ?

  • @MarvFitness
    @MarvFitness Рік тому

    This is gold right here......eureka

  • @rafahadenkar
    @rafahadenkar 2 роки тому +1

    Everything is a (Gangsta)state management library until the real Gangsta(Redux Toolkit) comes out.

  • @marcelorojas4079
    @marcelorojas4079 Рік тому

    Great and clear, thanks guys

  • @shineLouisShine
    @shineLouisShine 10 місяців тому

    Awesomely elegant.

  • @sayandcode
    @sayandcode 2 роки тому

    The fact that this video is not on the top of the search results for redux is criminal

  • @cgnguyen2857
    @cgnguyen2857 Рік тому

    awesome tut

  • @aldobangun223
    @aldobangun223 2 роки тому +1

    what a great content here. Terima Kasih

  • @sattukishore3280
    @sattukishore3280 2 роки тому

    how can we get updated RootState if someone injecting reducer dynamically in run time for code splitting ?

  • @shubhamlaad885
    @shubhamlaad885 2 роки тому +1

    nice demo

  • @ZeTaKevin
    @ZeTaKevin Рік тому

    Hi!, What is the font you use in your vscode?

  • @harishpatidar8888
    @harishpatidar8888 2 роки тому +1

    which font you are using in code editor?

    • @learnwithjason
      @learnwithjason  2 роки тому +1

      Operator Mono! My setup is here: jason.af/uses

    • @afifikani
      @afifikani 2 роки тому

      @@learnwithjason Ok, Operator Mono is the best thing I found this year. thanks for that!

  • @abanoubharby1655
    @abanoubharby1655 2 роки тому

    AMAAAZINGG

  • @SteffanBoodhoo
    @SteffanBoodhoo 5 місяців тому

    some of these increments are great but my God the createApi seems like a ridiculous pain, especially in an app where say I have to make ~30-50 different API calls

  • @Lafsha
    @Lafsha Рік тому

    so helpful

  • @andreiKspb
    @andreiKspb Рік тому

    thank you

  • @leevitammelin1795
    @leevitammelin1795 2 роки тому

    I thought it was a hoax, but everything works!

  • @shyambihariswami8250
    @shyambihariswami8250 Рік тому

    RTX is not working with `2.0.0.beta.0`

  • @bharatm3653
    @bharatm3653 2 роки тому

    captions don't sync with video. please correct it

  • @mpoisot
    @mpoisot 2 роки тому +3

    Extremely useful! Thank you both so much. But I can't stand all the popups from the live audience. I found it very distracting.

  • @piyushaggarwal5207
    @piyushaggarwal5207 Рік тому

    I will answer a question anywhere I find a text box 😆

  • @g_a_m_b_e_t_t_o_r8920
    @g_a_m_b_e_t_t_o_r8920 2 роки тому

    Super !

  • @BobbyBundlez
    @BobbyBundlez 2 роки тому

    holy shit. redux toolkit has immer built in?!!

  • @joydeepbhowmik6181
    @joydeepbhowmik6181 Рік тому +1

    Can we please make it a little bit harder for the beginners.PLEASE

  • @eghishemanukyan3021
    @eghishemanukyan3021 2 роки тому

    great

  • @poem-shorts
    @poem-shorts Рік тому

    why cant there just be a store as an object and just store.counter +=1 and when we want do store.counter tf is all this stupid complexity

  • @maykefernandesdossantos7374
    @maykefernandesdossantos7374 Рік тому +1

    the only annoying thing about this video is the guys talking about things like data request cache like if it was such a new thing... maybe to Redux but not to other state managers libs haha
    "wait why it didnt fetch again?"
    Come on man hahaha

  • @biancamagali100
    @biancamagali100 Рік тому

    hey! why are they using /next and not the normal npm i @reduxjs/toolkit/next?

    • @markerikson3383
      @markerikson3383 Рік тому +1

      Because when we made this video, RTK Query was not fully finished. It was only available in preview releases of Redux Toolkit, published to NPM under an `@next` tag.
      We later published RTK 1.6.0, which was the first release that officially included RTK Query, and all versions of RTK since then have the RTK Query pieces included.