Section 17 of 17
Questions
Contents
Do we need NgRx for all state? No. Shared, long-lived state that several features read goes into a store. Form state, open/closed panels and other state that one component owns stay in the component, with signals or a component-level Signal Store.
NgRx Store or NgRx Signal Store?
Both fit the architecture, both live in data-access, and the facade hides the choice. Fleetline uses the Store where an event log and devtools pay off (maintenance, planning) and the Signal Store for simpler domains (fleet summaries, notifications). The Signal Store events plugin (@ngrx/signals/events) brings Flux-style events to it, so the event log is no longer the only argument for the classic Store.
What about server state in Angular?
In Angular 22 resource, rxResource and httpResource are stable, and when two requests overlap only the latest one counts, as with switchMap. For mostly read data, they are Angular's counterpart of TanStack Query and Pinia Colada: data-access holds an httpResource, and the facade exposes its value() and isLoading(). The feature does not change.
Why Zustand and TanStack Query in React, not Redux Toolkit?
Both options pass the same boundary rules and both hide behind the same facade. Redux Toolkit gives what NgRx Store gives: slices, createEntityAdapter, listener middleware and a full event log. In Next.js, though, most state is server state and what remains on the client is small, so Fleetline keeps the data in the query cache and the rest in small Zustand stores with named actions in devtools. A team that needs an event log in a large client-side domain can use Redux Toolkit there.
Is a facade not just an extra layer? It is, and section 10 says when it is worth it. In React and Vue, the hook or composable is the idiomatic way to share state access anyway, so there the facade costs almost nothing.
Should every domain have an api library from day one?
No. Create it the first time another domain needs something. Before that, the domain is fully private, which is the best boundary there is.
Is this micro front-ends? No. Everything here builds into one application per app folder. The same domain cut is the natural seam for micro front-ends later, if the organisation ever needs independent deployments.
Can React, Vue and Angular really share libraries?
They share model and util libraries, tagged framework:agnostic, and test data builders. Components and stores are per framework. In Fleetline, about a fifth of the front-end code is framework-agnostic.
Where should we read more? Manfred Steyer's articles and the free e-book Enterprise Angular on angulararchitects.io, the Nx documentation on module boundaries, Sheriff, the NgRx documentation, TanStack Query, Zustand and Pinia.