diff --git a/docs/router-store/api.md b/docs/router-store/api.md index 4282f233ae..cae95bf6a4 100644 --- a/docs/router-store/api.md +++ b/docs/router-store/api.md @@ -3,7 +3,9 @@ ## Custom Router State Serializer During each navigation cycle, a `RouterNavigationAction` is dispatched with a snapshot of the state in its payload, the `RouterStateSnapshot`. The `RouterStateSnapshot` is a large complex structure, containing many pieces of information about the current state and what's rendered by the router. This can cause performance -issues when used with the Store Devtools. In most cases, you may only need a piece of information from the `RouterStateSnapshot`. In order to pair down the `RouterStateSnapshot` provided during navigation, you provide a custom serializer for the snapshot to only return what you need to be added to the payload and store. +issues when used with the Store Devtools. In most cases, you may only need a piece of information from the `RouterStateSnapshot`. In order to pare down the `RouterStateSnapshot` provided during navigation, you provide a custom serializer for the snapshot to only return what you need to be added to the payload and store. + +Additionally, the router state snapshot is a mutable object, which can cause issues when developing with [store freeze](https://github.com/brandonroberts/ngrx-store-freeze) to prevent direct state mutations. This can be avoided by using a custom serializer. To use the time-traveling debugging in the Devtools, you must return an object containing the `url` when using the `routerReducer`. @@ -54,4 +56,4 @@ export const reducers: ActionReducerMap = { ] }) export class AppModule { } -``` \ No newline at end of file +```