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

refactor(schematics): toggle immutability checks for root by default #1983

Merged

Conversation

itayod
Copy link
Contributor

@itayod itayod commented Jun 30, 2019

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the new behavior?

when use schematics forRoot toggle runtime checks by default.

Closes #1950

Does this PR introduce a breaking change?

[ ] Yes
[x] No

@itayod
Copy link
Contributor Author

itayod commented Jun 30, 2019

@timdeschryver
Currently added:
strictStateImmutability: true,
strictActionImmutability: true

What do you think about adding the strictStateSerializability & strictActionSerializability?

@ngrxbot
Copy link
Collaborator

ngrxbot commented Jun 30, 2019

Preview docs changes for 58f4fd3 at https://previews.ngrx.io/pr1983-58f4fd3/

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

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

I think immutability is important, serializability isn't always needed and might backfire if you aren't careful. For now, I would leave it as it is.

Do you also want to add the schematic in the docs at https://ngrx.io/guide/schematics/store?
Feel free to ping me if you need some help.

@brandonroberts
Copy link
Member

I don't think we need another flag for this. It's a reasonable default and is easy enough to remove.

@itayod
Copy link
Contributor Author

itayod commented Jul 1, 2019

I think immutability is important, serializability isn't always needed and might backfire if you aren't careful. For now, I would leave it as it is.

Do you also want to add the schematic in the docs at https://ngrx.io/guide/schematics/store?
Feel free to ping me if you need some help.

Sure, I will update the docs thanks :) 👍

@itayod
Copy link
Contributor Author

itayod commented Jul 1, 2019

@brandonroberts I have removed the flag as you suggested

@ngrxbot
Copy link
Collaborator

ngrxbot commented Jul 1, 2019

Preview docs changes for 0f384b0 at https://previews.ngrx.io/pr1983-0f384b0/

@itayod
Copy link
Contributor Author

itayod commented Jul 1, 2019

I think immutability is important, serializability isn't always needed and might backfire if you aren't careful. For now, I would leave it as it is.
Do you also want to add the schematic in the docs at https://ngrx.io/guide/schematics/store?
Feel free to ping me if you need some help.

Sure, I will update the docs thanks :) 👍

@timdeschryver after removing the flag there is no need to update the docs

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@brandonroberts brandonroberts merged commit 2b8178d into ngrx:master Jul 1, 2019
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.

RFC: schematics should toggle immutability checks on by default
4 participants