You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Devtools integration with `@ngrx/signals/events` is now available starting in version 20.TODO
13
+
:::
14
+
9
15
Redux Devtools is a powerful browser extension tool, that allows you to inspect every change in your stores. Originally, it was designed for Redux, but it can also be used with the SignalStore. You can download it for Chrome [here](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd).
10
16
11
17
To use the Devtools, you need to add the `withDevtools()` extension to your SignalStore:
@@ -165,6 +171,24 @@ const Store = signalStore(
165
171
);
166
172
```
167
173
174
+
## Events tracking: `withTrackedReducer`
175
+
176
+
`withTrackedReducer` tracks state changes within the events
177
+
plugin. This utility automatically derives the event name, streamlining
178
+
the tracking process.
179
+
180
+
To use it
181
+
182
+
1._Replace usages of `withReducer` with `withTrackedReducer`_. Note: native `withReducer` support is planned for the future, but that requires upstream support from `@ngrx/signals`.
183
+
2._[`withGlitchTracking`](#withglitchtracking) must be specified within `withDevtools`_. If `withTrackedReducer` is used without the devtools and glitch tracking, runtime errors will be thrown.
184
+
185
+
```ts
186
+
// Must have all three, or runtime errors for thee!
const Store =signalStore({ providedIn: 'root' }, withDevtools('store', withGlitchTracking()), withTrackedReducer());
190
+
```
191
+
168
192
## Disabling Devtools in production
169
193
170
194
`withDevtools()` is by default enabled in production mode, if you want to tree-shake it from the application bundle you need to abstract it in your environment file.
0 commit comments