Skip to content

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

Merged
brandonroberts merged 2 commits into
ngrx:masterfrom
itayod:rfc/add-schematics-runtime-checks-for-root
Jul 1, 2019
Merged

refactor(schematics): toggle immutability checks for root by default#1983
brandonroberts merged 2 commits into
ngrx:masterfrom
itayod:rfc/add-schematics-runtime-checks-for-root

Conversation

@itayod

@itayod itayod commented Jun 30, 2019

Copy link
Copy Markdown
Contributor

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

itayod commented Jun 30, 2019

Copy link
Copy Markdown
Contributor Author

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

What do you think about adding the strictStateSerializability & strictActionSerializability?

@ngrxbot

ngrxbot commented Jun 30, 2019

Copy link
Copy Markdown
Collaborator

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

@timdeschryver timdeschryver left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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

@itayod

itayod commented Jul 1, 2019

Copy link
Copy Markdown
Contributor Author

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

itayod commented Jul 1, 2019

Copy link
Copy Markdown
Contributor Author

@brandonroberts I have removed the flag as you suggested

@ngrxbot

ngrxbot commented Jul 1, 2019

Copy link
Copy Markdown
Collaborator

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

@itayod

itayod commented Jul 1, 2019

Copy link
Copy Markdown
Contributor Author

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

@timdeschryver timdeschryver left a comment

Copy link
Copy Markdown
Member

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