
Ask HN: What to Learn in 2020: Redux vs. RxJS vs. Context-API - WolfOliver
Starting a greenfield React app, is it still state-of-the art to use Redux as state manager.
Will Redux still be around in 2 years or will it be replaced by simpler options? Any thoughts on that?
======
acemarke
Hi, I'm a Redux maintainer. I can confirm that Redux will be around for a very
long time, and it's easier to use it now than ever before.

Please see my post "Redux - Not Dead Yet!" [0] for information on how Redux
compares to other options like context in today's React ecosystem.

Also, note that you should be using our new official Redux Toolkit package [1]
to write your Redux logic, our "Style Guide" docs page [2] provides guidance
on recommended patterns and best practices, and our Redux templates for
Create-React-App [3] come with RTK and React-Redux hooks set up out of the
box.

[0] [https://blog.isquaredsoftware.com/2018/03/redux-not-dead-
yet...](https://blog.isquaredsoftware.com/2018/03/redux-not-dead-yet/)

[1] [https://redux-toolkit.js.org](https://redux-toolkit.js.org)

[2] [https://redux.js.org/style-guide/style-guide](https://redux.js.org/style-
guide/style-guide)

[3] [https://github.com/reduxjs/cra-template-
redux](https://github.com/reduxjs/cra-template-redux)

------
hknd
It's the same every year: learn and completely understand the basics - the
rest will follow.

If you know how latest react works you don't need redux or rxjs as hooks can
solve most problems in a reusable way.

Example:
[https://github.com/oldboyxx/jira_clone](https://github.com/oldboyxx/jira_clone)

------
dexwiz
Redux will be around for a while due to the number of people who already use
it, but may not be a first choice at some point.

RxJS is kind of equivalent to Promises + Utils. You can use it to structure
code, but it won’t solve state issues on its own.

I don’t know enough context api to comment on it.

~~~
WolfOliver
To me it looks like you can implement a proven MVC architecture using React
Hooks and RxJS: [https://blog.logrocket.com/rxjs-with-react-hooks-for-
state-m...](https://blog.logrocket.com/rxjs-with-react-hooks-for-state-
management/)

So should it be powerfull enought?

~~~
dexwiz
In that case you are using hooks to manage your state and RxJS to abstract
over the concurrent behavior. IIRC you can use a few things to handle
concurrency for hooks like promises, Async/await, or callbacks.

