Chase Baker
- Software Engineer
When starting a new React project some decisions will need to be made! Decisions like which state management will work best for the project you are working on? More specifically whether to go with Akita or Redux.
I’m just going to get right into it!
Redux: This is the most popular state management tool out there for React so it naturally will come with a large community of support.
Pros:
- Solid Speed/Performance even with large amounts of data
- Most used option so a lot of examples/resources online
- Well Supported
Cons:
- Large Learning Curve
- A lot of boilerplate
Akita: This is newer but has made some waves in the community. It was originally created for Angular but has become more flexible and used in React, Vue, and VanillaJS as well.
Pros:
- Simple/Small Learning Curve
- Little to no boilerplate
- Great for small to medium sized apps
Cons:
- Poor Speed/Performance
- Not ideal for apps that use large amounts of data
- Not as common so less resources/examples (even though it’s less common there is plenty to find on Akita)
Its upside is how simple it is to use, it does not require much boilerplate at all if any. This is the main reason developers will use Akita. With it being so simple it’s great for small to medium sized apps.
Here are two articles linked below comparing speed/performance and it looks like Akita performed the worst (by a lot) when compared to Redux and/or react-state/store.
Conclusion:
If you are building a large scale app with a lot data I would recommend Redux mainly for its speed and large community. It may be more complicated to start but I think it’s worth it based on its performance alone.
If you are building a smaller application where there won’t be a large amount of data that would need to be handled I recommend Akita. It’s fast and simple to learn with little to no boilerplate.
Here are a couple of the articles I read if you would like to read into it more.
These first 2 have real time examples of performance (one using React and the other using Angular):
Performance Comparison of State Management Solutions in React
Deep Comparison Of State Management Solutions for Angular
Info on Akita:
OOP and RXJS managing state in React with Akita
Info on Redux:
Another blog on the topic of React and whether to choose TypeScript or JavaScript can be found here.