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

fix(signals): Remove the protection for state mutation in dev mode #4686

Merged

Conversation

rainerhahnekamp
Copy link
Contributor

Applying Object.freeze on the state caused too many issues with edge cases, where mutable changes are necessary.

Therefore, this feature is removed.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

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

Closes #4683

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Applying `Object.freeze` on the state caused too many issues
with edge cases, where mutable changes are necessary.

Therefore, this feature is removed.
Copy link

netlify bot commented Jan 26, 2025

Deploy Preview for ngrx-io ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b00df35
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/6798b07b56c1ad0008445eb6
😎 Deploy Preview https://deploy-preview-4686--ngrx-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

@rainerhahnekamp
Copy link
Contributor Author

useful to also mention the revert in the migration guide

@timdeschryver I'd just remove the whole section. Devs should always install the latest v19?

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.

@timdeschryver timdeschryver merged commit ae7922e into ngrx:main Jan 28, 2025
10 checks passed
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.

SignalStore: RFC: Reverting Object.freeze Protection in SignalStore
6 participants