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

Turn off Immer setAutoFreeze -- issues with modifying immutable (readonly) state #590

Open
ccrowley96 opened this issue Jun 23, 2022 · 0 comments
Labels
bug 🐛 Something isn't working

Comments

@ccrowley96
Copy link
Contributor

Describe the bug
Immer auto freeze is suppressing issues related to react state object refs that should be immutable and readonly being edited. This came up in @msnyder-msft's behavior form dirty state refactor. Bugs related to linked object refs being edited, when they were thought to be cloned came up.

In order to fix these issues, we'll need to remove setAutoFreeze(false); in StandalonePropertyInspector.state.ts. This throws errors when any immutable state passed through produce is edited elsewhere (likely many places in our code base).

@ccrowley96 ccrowley96 added the bug 🐛 Something isn't working label Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant