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

feat(signals): add withFeature #4739

Merged
merged 8 commits into from
Mar 31, 2025

Conversation

rainerhahnekamp
Copy link
Contributor

withFeature adds the possibility to pass on signals, methods, or properties from a store to a custom feature.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] 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 #4678

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Copy link

netlify bot commented Mar 25, 2025

Deploy Preview for ngrx-io ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 485d9fd
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/67eab1e2ee0f18000892fbaa
😎 Deploy Preview https://deploy-preview-4739--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.

@rainerhahnekamp rainerhahnekamp force-pushed the feat/signal/with-feature branch from ac9ddff to 05ce600 Compare March 26, 2025 09:02
@rainerhahnekamp rainerhahnekamp marked this pull request as draft March 26, 2025 15:26
@rainerhahnekamp rainerhahnekamp marked this pull request as ready for review March 27, 2025 15:20
@rainerhahnekamp
Copy link
Contributor Author

@markostanimirovic, @timdeschryver. should be ready for review. following things have been changed compared to the initial commit:

  • Separate Tests ensuring that state signals, properties and methods can be passed on
  • Example in documentation replaced with the bookstore context
  • Switched to inpersonal style in docs
  • Reduced JSDoc to a minimum
  • Added a test which combines withFeature and the input constraint
  • slimmed down the code in withFeature

rainerhahnekamp and others added 8 commits March 31, 2025 17:16
`withFeature` adds the possibility to pass on signals,
methods, or properties from a store to a custom feature.

Closes ngrx#4678
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
…re-features.md

Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
…re-features.md

Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
Co-authored-by: Marko Stanimirović <markostanimirovic95@gmail.com>
@rainerhahnekamp rainerhahnekamp force-pushed the feat/signal/with-feature branch from 100d1ea to 485d9fd Compare March 31, 2025 15:16
@markostanimirovic markostanimirovic merged commit 345ab4f into ngrx:main Mar 31, 2025
10 checks passed
@SerkanSipahi
Copy link
Contributor

Nice, I like it!

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.

Custom feature builder that receives a function instead of array of features
4 participants