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): export toDeepSignal #4533

Closed
wants to merge 1 commit into from

Conversation

matheo
Copy link

@matheo matheo commented Sep 24, 2024

PR Type

[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:

What is the current behavior?

@ngrx/signals have the toDeepSignal utility that could be useful for monorepos where a library requires this kind of stuff without creating a signalState.

In my case, I'm using xstate and xstate-ngx where we select a state-slice or a single value from it, we can convert it to Signal/DeepSignal easily with this utility.

Refs #4377

What is the new behavior?

Being able to import { toDeepSignal } from '@ngrx/signals' instead duplicating it inside our monorepos.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Copy link

netlify bot commented Sep 24, 2024

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit d0ecf01
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/66f30fca60bbd200084ac46c

@markostanimirovic
Copy link
Member

I'll create a PR for this feature soon: #4202

deepComputed can be used to convert any signal to a deep signal.

@matheo
Copy link
Author

matheo commented Sep 24, 2024

@timdeschryver I guess this comes handy for monorepos more than libraries that requires just this utility.
I'm already using @ngrx/signals in my monorepo so it's painless to consume it and not to duplicate it.

@matheo
Copy link
Author

matheo commented Sep 24, 2024

@markostanimirovic thanks for the cool stuff!
perhaps I see that the issue is waiting for months :(

@timdeschryver
Copy link
Member

I'm closing this in favor of #4202
In the future, please open an issue first as mentioned in the referenced PR.

@matheo matheo deleted the pr/export-to-deep-signal branch October 16, 2024 00:23
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.

3 participants