Software Development

Which state management should I choose in 2024: NgRx Store or the new SignalStore?

AM Asked by Amanda Lewis · 05-09-2023
0 upvotes 15,688 views 0 comments
The question

I'm starting a new project and I'm torn between using the traditional NgRx Store (with actions, reducers, and effects) and the newer @ngrx/signals SignalStore. The traditional way feels robust for debugging with Redux DevTools, but SignalStore looks so much more lightweight and easier to write. Is the boilerplate of traditional NgRx still worth it for a mid-sized application, or is SignalStore powerful enough to handle complex side effects and global state? 

3 answers

0
BA
Answered on 12-11-2023

I spent most of 2023 working with both, and honestly, SignalStore is a game-changer for mid-sized apps. It provides a functional, composable API that feels very "Angular-native." You can still use the Redux DevTools with it if you configure the plugin, so you don't lose that debugging power. Traditional NgRx is still the king for massive, multi-team apps where you need very strict, predictable state transitions, but for most projects, the withMethods and withHooks in SignalStore provide plenty of structure without the headache of writing 10 files for one feature. 

0
ST
Answered on 15-11-2023

Does SignalStore handle complex asynchronous side effects as cleanly as NgRx Effects does, or do you end up with a mess of promises?

BA 18-11-2023

Actually, Steven, SignalStore handles this quite well using rxMethod. It allows you to integrate RxJS streams directly into your store methods. So, you get the best of both worlds: the declarative power of RxJS for handling race conditions or debouncing in your API calls, but the simplicity of Signals for the actual state storage. It’s much cleaner than the old @Effect() decorators and doesn't feel messy at all.

0
65
Answered on 20-11-2023

If you want to move fast, go with SignalStore. It reduces boilerplate by at least 60% and the learning curve is much lower for new developers. 

AM 21-11-2023

Definitely. I’ve seen junior devs pick up SignalStore in a day, whereas teaching them the Action/Reducer/Selector flow of standard NgRx used to take a week.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session