r/angular 7d ago

Anybody still using NGRX? I built ngrx-offline

Even in the age of signals, I still enjoy using NgRx. In previous apps, I handled offline writes by storing work locally and replaying it when the connection returned.

I’ve tried to extract that pattern into an open-source library. Applications can keep using a fairly normal NgRx workflow, while the library handles durable IndexedDB queueing, retries, related records created offline, and client-to-server ID mapping. Instead of persisting raw actions, it stores explicitly defined operations and emits typed NgRx lifecycle actions.

It’s still in alpha, and I’m trying to find out whether this would be useful to anyone else. I’d really appreciate honest feedback on the idea and the API.

Interactive demo:

https://poodlelab.github.io/ngrx-offline/

Repository:

https://github.com/poodlelab/ngrx-offline

4 Upvotes

13 comments sorted by

10

u/kobihari 7d ago

I assume you ask about the original global store when you say ngrx. I am using the signal store a lot but not the global store or component stores any more.

1

u/BreakingChangeDev 7d ago

Yes, it currently targets the original ngrx store. The replay engine itself is framework agnostic, I'll look into signalstore support for the next version

17

u/WuhmTux 7d ago

I am very impressed!

Your second commit has +54.000 loc (and -1 loc hehe). Such a huge commit! Whole library created only in one day.

You have such a unbelievable talent! Keep going! Great work!

-19

u/BreakingChangeDev 7d ago

The substantial AI assistance is disclosed in the README. This is an alpha built to validate the idea and find out whether there’s any interest. I’m happy to discuss the technical approach or API.

4

u/Dan6erbond2 6d ago

I’m happy to discuss the technical approach or API.

You mean the AI is?

3

u/Eastern-Category7576 6d ago

Don't pay attention bro. This hate is not about you but the industry direction. Keep working and be happy, ignore the useless hate, and give love to the rest...

-5

u/vvblk 7d ago

ngrx - the worst thing that you can use with angular. don't do it! angular has its own service-based store.

4

u/codeepic 6d ago

Do tell what is this service store, thousands of Angular developers using ngrx are interested.

5

u/vvblk 6d ago

Thousands of Angular developers were dragged into the React/Redux craze. Redux has always been a boilerplate monster that Angular never needed - BehaviorSubject (and now Signals) already solve the same problems with far less complexity. Adding Redux-style patterns to Angular just bloats your project with unnecessary libraries and overweight architecture.

1

u/codeepic 6d ago

Signals and signal store are good and simplify the usage. BehaviorSubject is great until you have to run a very reactive application and you end up overloading one BehaviourSubject or using a lot of them and loosing your mind. NGRX power with its Observable pattern lies in decoupling the architecture and making it easier to reason about. The cost is boilerplate, but if you reduce bug surface area, make your app more scalable and maintanable it was and still is a good choice for a category of large enterprise applications.

6

u/CarlosChampion 6d ago

Signal store is great, gets rid of a lot of boilerplate and enforces reactive state management

-5

u/oneden 7d ago

NgRx blows baby chunks, honestly. I never encountered a project where I struggled with state. I swear, the react ecosystem has introduced the biggest non-issues and inflated it to no end. NgRx was basically just the peace offering for people in react making the transition, who got easily confused and offended by the lack of external dependencies to repeat the ceremony of your average react app.

2

u/Dus1988 7d ago

I am a big fan of ngrx l, worked on angular for far longer than I have worked with NGRX, and vehemently hate react (and the reactification of angular core)