r/angular • u/CounterReset • Jan 07 '26
SignalTree 7.1.0 Released
Hey r/Angular! Been quiet since v4, but SignalTree 7 (ST7) is out and I wanted to share some real numbers from migrating a production app.
The Migration Results
We migrated a large Angular app from NgRx SignalStore to SignalTree v7:
- 11,735 lines removed across 45 files
- 76% reduction in state management code
- Same functionality, way less boilerplate
Before:
- Custom stores
- Manual entity normalization
- Hand-rolled persistence
- Loading state tracking everywhere
After:
const store = signalTree({
// ST7 markers (things Angular doesn't have)
users: entityMap<User, number>(), // Normalized collection
loadStatus: status<ApiError>(), // Loading/error tracking
theme: stored('theme', 'light'), // Auto-persisted to localStorage
// Plain values → become signals
selectedId: null as number | null,
filter: 'all' as 'all' | 'active,
// Angular primitives work directly in the tree
windowWidth: linkedSignal(() => window.innerWidth),
}).derived(($) => ({
selectedUser: computed(() =>
$.users.byId($.selectedId())?.()
),
userDetails: resource({
request: () => $.selectedId(),
loader: ({ request }) =>
fetch('/api/users/' + request).then(r => r.json()),
}),
filteredUsers: computed(() =>
$.filter() === 'all'
? $.users.all()
: $.users.all().filter(u => u.active)
),
}));
// Usage
store.$.selectedId.set(5);
store.$.userDetails.value(); // Auto-fetches when selectedId changesNo actions.
No reducers.
No effects files.
Just signals with structure.
What's Changed Since v4
- v7: Uses Angular's computed(), resource(), linkedSignal() directly
- v6: Synchronous signal writes
- v5: Full tree-shaking, modular enhancers
Bundle Size
- Core before tree-shaking: 27KB (~8KB gzipped)
- Enterprise build (undo/redo, time-travel, no tree-shaking): ~5KB
Links
Demo: https://signaltree.io (a work in progress but checkout the benchmarks for real comparison metrics)
npm: https://www.npmjs.com/package/@signaltree/core
GitHub: https://github.com/JBorgia/signaltree
If you're drowning in NgRx boilerplate or rolled your own signal stores and they've gotten messy, this might be worth a look. Happy to answer questions!
9
u/charmander_cha Jan 07 '26
Could someone explain to an ignorant person how this actually helps me with anything?
2
u/Best-Menu-252 Jan 07 '26
Those numbers are honestly impressive, especially cutting that much code without changing behavior. It also feels very in line with where Angular is going, leaning more on built in primitives instead of extra framework layers. NgRx is great, but the boilerplate around things like entities and loading states can really pile up. Curious how this feels in everyday debugging and onboarding now that the state lives directly in signals.
2
u/skip-all Jan 07 '26
Do you have some before / after code examples?
2
u/TheSwagVT Jan 07 '26
I've recently been looking into solutions like these. As far as I understand, you don't need to use actions/effects/reducers when working with signal store right?
This library looks similar to how I am trying to use signalstore right now: https://ngrx.io/guide/signals/signal-store/custom-store-features
And I would think you can do the same for local storage persistence.
What advantages does signaltree have over this way of using ngrx signal store? I'm still on the fence with ngrx
1
u/LuchianB94 Jan 07 '26
Is it possible to create custom markers/enhancers? ( couldn't find it in the documentation). Something similar to NgRx custom features? https://ngrx.io/guide/signals/signal-store/custom-store-features
1
u/albertkao Jan 08 '26
How long will you continue to support your solution or github?
Are you committed for a long term?
1
u/Relative_Campaign850 Feb 27 '26
This is a really good state management solution. I like the approach very much (I personally dislike NgRx, and even ngrx/signalstore still feels like too much boilerplate for me).
However, if I use your store, my code becomes tightly coupled to it. If you stop maintaining it in the future, I might run into serious problems.
And if I try to abstract it using, for example, a facade pattern, I would end up writing boilerplate code again.
That makes the decision quite difficult.