Redux Saga - Asynchronous Side Effects for Redux

Поделиться
HTML-код
  • Опубликовано: 27 июл 2024
  • Learn Redux Saga with Redux which is a solution to add asynchronous code like making API calls to Redux. It is a scalable solution for big production projects. Here we create a real Redux Saga example by refactoring React hooks code to Redux and Redux Saga.
    TIMESTAMPS
    0:00 Introduction
    1:22 Project
    3:41 Redux Saga installation
    10:11 Fetching users
    13:38 Adding Redux saga
    22:21 Creating a user
    ► CHECK MY COURSES - monsterlessons-academy.com/co...
    FOLLOW ME
    ► TWITTER - / monster_lessons
    REFERENCES
    ► Source code - github.com/monsterlessonsacad...
    RECOMMENDED VIDEOS
    ► My editor setup for web development - • Best Text Editor for W...
    ► Angular Tutorial for Beginners - • Angular Tutorial for B...
    ► Vue JS Crash Course - • Vue JS Crash Course fo...
    ► React Hooks Full Course - • React Hooks Tutorial f...
    ► Typescript Course for Beginners - • Typescript Crash Cours...
    ► Build a Todo App with Angular - • Build a Todo App With ...
    ► Creating custom select library - • Custom Javascript Drop...
    ► HTML Price comparison - • Practice CSS and HTML ...
    ► How to build Quiz with React hooks - • How to Build a Quiz Wi...
    MY COURSES
    ► NestJS course - • Nest JS Project From S...
    ► Docker + Docker compose course - • Docker Compose Tutoria...
    ► Angular + NgRx course - • Angular Course 2021 - ...
    ► Vue + Vuex course - • Vue Course With Projec...
    ► React hooks course - • React Hooks tutorial b...

Комментарии • 23

  • @lostin8159
    @lostin8159 Год назад

    Thank you so much! This video is the one that finally made me understand it.
    If someone else is still struggling, what worked for me is not splitting so much (just for learning purposes) and not abstracting actions, simply doing yield put({ type: "ABC", payload: ABC }).
    Maybe I'm weird, but this made my brain click, now that I understand I can split everything back to different folders and files again.

  • @gagangupta1255
    @gagangupta1255 5 месяцев назад

    Awesome video. Thanks alot for giving the context and not directly jumping to the coding

  • @viniciusm.m.7822
    @viniciusm.m.7822 Год назад +3

    Nice!!!

  • @nebiyuzewge4471
    @nebiyuzewge4471 2 месяца назад

    very good video. i get the core concept with in 30 minutes. thank you!

  • @thomasmendoza8710
    @thomasmendoza8710 Год назад +1

    My new favorite instructor. Soon as I get a job with your videos I will get you some 🍺 💰

  • @stoyangrigorov5634
    @stoyangrigorov5634 Год назад

    Thanks Alex

  • @Deliverant
    @Deliverant Год назад +1

    Thx for the video. I've been using redux and redux-saga for a very long time in my projects but i'm starting to wonder, what are the alternatives(if there are) to redux-saga in 2022? I know there are tons of alternatives for redux, but what about redux-saga?

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  Год назад

      I don't know any alternatives to redux saga and I don't know if we need anything else. It is either redux-thunk or redux-saga.

    • @Deliverant
      @Deliverant Год назад

      @@MonsterlessonsAcademy Yeah that what i was thinking. So if instead of redux we use some other state management library like Zustand for example, how do we manage async effects?

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  Год назад

      @@Deliverant then it depends on the library how they do async effects.

  • @bigxmark8656
    @bigxmark8656 6 месяцев назад

    Hi, can i ask, so the action for the createUser was never used? 23:03

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  6 месяцев назад +1

      Hi it is used automatically through saga
      github.com/monsterlessonsacademy/monsterlessonsacademy/blob/245-redux-saga/src/redux/sagas/handlers/createUser.js

  • @shineLouisShine
    @shineLouisShine 5 месяцев назад

    16:00 - I see what you did there ;)
    (...already subscribed though)
    25:05 - the pop-up modal reminds me that Redux--Saga also include Channels mechanism.
    Do you have any experience with this concept? (requires a deeper dive)
    - Your project arrangement is very elegant but I find files with the exact same name quite confusing to work with (despite the different folders which they are included in)

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  5 месяцев назад

      Thanks! Keep in mind that Saga is an old tool and is not recommened by Redux team nowadays. The recommened solution is redux-toolkit.

    • @sugaryxegnirys
      @sugaryxegnirys 6 дней назад

      @@MonsterlessonsAcademy I left a job using rtk and now I'm interviewing at a company that uses redux saga 💀

  • @soumyasurajita9651
    @soumyasurajita9651 Год назад

    Nice and to the point explanation of saga. Loved it. Also did you cover redux-thunk/redux-toolkit for sideeffects