-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
@ngrx/signals: Improve Developer Experience for Immutability #4030
Comments
What about tweaking signatures and return |
@samuelfernandez this is exactly what I am suggesting. You won't get away with a simple |
@rainerhahnekamp — may I suggest using this utility from |
yes, but I'd rather copy it and not have it as a dependency of ngrx itself... |
That's our stance on it as well. Not everyone wants to use immer, and if they do they can provide their own wrapper around See closed issue here #3998 |
@brandonroberts, would it make sense to bring up a PR for the "type-safe"-only mode without immer or should we just close this issue? |
Which @ngrx/* package(s) are relevant/related to the feature request?
store
Information
Ensuring that state updates are immutable is crucial for Signal to emit correctly and trigger necessary DOM updates, derived signals, or side effects. Currently, an immutable runtime check is available, but only in development mode due to its potential performance impact.
To enhance the robustness of applications and facilitate debugging, I propose two additional behaviours:
Example:
If accepted, I would be happy to provide an initial PR.
Describe any alternatives/workarounds you're currently using
No response
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: