Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom router state serializer #1129

Merged
merged 3 commits into from
Jun 23, 2018

Conversation

timdeschryver
Copy link
Member

Closes #1125

@coveralls
Copy link

coveralls commented Jun 13, 2018

Coverage Status

Coverage remained the same at 87.971% when pulling 73ef601 on tdeschryver:pr/example-app-router-state into fb9b172 on ngrx:master.

@@ -96,8 +96,6 @@ export class RouterEffects {
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 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still true. We just provide a serializable-safe option out of the box.

@brandonroberts brandonroberts merged commit 389cd78 into ngrx:master Jun 23, 2018
@timdeschryver timdeschryver deleted the pr/example-app-router-state branch June 23, 2018 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants