If we don't use redux-thunk or redux-saga, what do we use?
sunflowerseed

sunflowerseed @sunflower

About: Front End Dev

Joined:
Jan 15, 2020

If we don't use redux-thunk or redux-saga, what do we use?

Publish Date: Feb 26 '20
7 4

Only a portion of people who use React uses Redux, and only a portion of that uses redux-thunk or redux-saga:

Alt Text

Comments 4 total

  • 𝙻𝚊𝚌𝚊𝚜𝚊
    𝙻𝚊𝚌𝚊𝚜𝚊Feb 26, 2020

    For the last year I've been using react context as my global state solution with some useReducer magic here and there, and I'm very happy with the results. I miss how easy was to use middlewares, but there's always a workaround.

    I just started using Apollo lately, and if you use GraphQL, it also works pretty well!

    • sunflowerseed
      sunflowerseedFeb 26, 2020

      you don't use Redux but just use a context? does that mean when data updates the whole App's components render() are called?

      • 𝙻𝚊𝚌𝚊𝚜𝚊
        𝙻𝚊𝚌𝚊𝚜𝚊Feb 27, 2020

        Nope, good thing about using Context, you can create more than one. Also, only the components "subscribed" to a context will rerender if the context changes. It's basically the same as REDUX.

        You have a great example of how to do it here: kentcdodds.com/blog/how-to-use-rea...

  • Sung M. Kim
    Sung M. KimFeb 27, 2020

    Seems like you are looking for a state management library w/o Redux.

    I hear good things about Zustand, which you might want to try. (I will too)

Add comment