Need advice about which tool to choose?Ask the StackShare community!
Redux vs RxJS: What are the differences?
What is Redux? Predictable state container for JavaScript apps. Redux helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as live code editing combined with a time traveling debugger.
What is RxJS? The Reactive Extensions for JavaScript. RxJS is a library for reactive programming using Observables, to make it easier to compose asynchronous or callback-based code. This project is a rewrite of Reactive-Extensions/RxJS with better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
Redux belongs to "State Management Library" category of the tech stack, while RxJS can be primarily classified under "Concurrency Frameworks".
Redux and RxJS are both open source tools. It seems that Redux with 49.5K GitHub stars and 12.8K forks on GitHub has more adoption than RxJS with 19.7K GitHub stars and 2.26K GitHub forks.
Instagram, Intuit, and OpenGov are some of the popular companies that use Redux, whereas RxJS is used by Portfolium, Free Code Camp, and Onefootball. Redux has a broader approval, being mentioned in 1036 company stacks & 836 developers stacks; compared to RxJS, which is listed in 57 company stacks and 44 developer stacks.
Pros of Redux
- State is predictable191
- Plays well with React and others149
- State stored in a single object tree125
- Hot reloading out of the box78
- Allows for time travel73
- You can log everything14
- Great tutorial direct from the creator11
- Endorsed by the creator of Flux6
- Test without browser6
- Easy to debug5
- Enforces one-way data flow2
- Granular updates2
- Blabla1
Pros of RxJS
- Easier async data chaining and combining6
- Steep learning curve, but offers predictable operations3
- Observable subjects2
- Ability to build your own stream2
- Works great with any state management implementation2
- Easier testing2
- Lot of build-in operators1
- Simplifies state management1
- Great for push based architecture1
- Documentation1
Sign up to add or upvote prosMake informed product decisions
Cons of Redux
- Lots of boilerplate12
- Verbose6
- Design5
- Steeper learning curve than RxJs4
- Steeper learning curve than MobX4
- Steep learning curve4
Cons of RxJS
- Steep learning curve3