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(store): Use createFeature in feature-Schematics #3776

Merged
merged 3 commits into from
Feb 27, 2023

Conversation

faragos
Copy link
Contributor

@faragos faragos commented Feb 14, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

See issue: Closes #3741

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

What is the current behavior?

Closes #3741

What is the new behavior?

It uses the new createFeature-API instead of the old createReducer only

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

I'm not sure if it really is a feature. It can also be a refactoring, but it changes the API somewhat so.

@netlify
Copy link

netlify bot commented Feb 14, 2023

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit cf4bf9b
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/63fc8710aa126d000895efed

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
I encountered a little issue, see the comments for more info.

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also update the PR description and link the correct issue #3741 (instead of 3736).

I'm also thinking of exporting the "old" FeatureKey constant.
This because some schematics like selectors and store are using the FeatureKey constant.

To be safe, we can export the feature, name, reducer, and FeatureKey.

@faragos
Copy link
Contributor Author

faragos commented Feb 17, 2023

Can you also update the PR description and link the correct issue #3741 (instead of 3736).

I'm also thinking of exporting the "old" FeatureKey constant. This because some schematics like selectors and store are using the FeatureKey constant.

To be safe, we can export the feature, name, reducer, and FeatureKey.

I implemented your suggestions. I'm not quite sure about exporting the old featureKey, because it's redundant. But I understand regarding compatibility it's the easiest solution without changing the import in the module

@faragos faragos requested review from timdeschryver and markostanimirovic and removed request for timdeschryver and markostanimirovic February 23, 2023 10:44
Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @faragos 👏👏

@faragos
Copy link
Contributor Author

faragos commented Feb 27, 2023

@markostanimirovic I implemented your suggestions. It looks way cleaner now thanks. I also removed the not needed Action import is that fine?

@timdeschryver
Copy link
Member

Thank you @markostanimirovic for catching these 😀

Copy link
Member

@markostanimirovic markostanimirovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thanks @faragos!

@markostanimirovic markostanimirovic merged commit 9b3647f into ngrx:master Feb 27, 2023
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.

Use createFeature in feature-Schematics
3 participants