-
-
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
fix(signals): create deep signals for custom class instances #4614
fix(signals): create deep signals for custom class instances #4614
Conversation
✅ Deploy Preview for ngrx-io canceled.
|
Hi @markostanimirovic, why do we want to support deep signals for class instances? I’m not sure we should “split it up” as we would with a normal object literal. To me, a class instance is an atomic unit—it has its own state, encapsulated properties, methods that define its logic, and potentially inheritance. Given these characteristics, I don’t see it as a good fit for a deep signal. ![]() |
I fully agree with you! Because of that, this won't be shown in official docs or be recommended anywhere. There are two main reasons for this change:
If you remember in the beginning, SignalStore didn't support interfaces, and the state type was restricted to |
7588948
to
5d66296
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rainerhahnekamp is this also OK for you? (because you added a comment)
All good 👍 |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Error
,Date
, andRegExp
.Closes #4604
What is the new behavior?
Error
,Date
, andRegExp
.Does this PR introduce a breaking change?