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

@ngrx/component: Separate modules for LetDirective and PushPipe #3341

Closed
markostanimirovic opened this issue Mar 9, 2022 · 2 comments · Fixed by #3449
Closed

@ngrx/component: Separate modules for LetDirective and PushPipe #3341

markostanimirovic opened this issue Mar 9, 2022 · 2 comments · Fixed by #3449

Comments

@markostanimirovic
Copy link
Member

Add separate modules for better tree shaking:

  • LetModule for LetDirective
  • PushModule for PushPipe

An additional change to consider: Deprecate ReactiveComponentModule.

@danielkleebinder
Copy link

I would recommend delaying this feature until standalone components, directives and pipes are stable in Angular. In Angular 14.0.0, this feature was already introduced as developer preview (for reference: Angular v14 is now available!). Making the LetDirective and the PushPipe standalone is probably the cleaner solution and more idiomatic looking forward to future Angular releases. Introducing two new modules (LetModule and PushModule) in NgRx 14.x might cause said modules to become deprecated in NgRx 15.x already and thus further complicates the migration process (for developers using NgRx and developers actively working on NgRx).

@markostanimirovic
Copy link
Member Author

Hi @danielkleebinder 👋

We were also thinking of defining PushPipe and LetDirective as standalone. However, all Angular and Angular Material declarables are currently (in v14) exported via NgModules. Because of that, we decided to create granular modules for PushPipe and LetDirective in v14.

If standalone declarables become standard in core Angular packages in the future, we'll also define declarables from @ngrx/component package as standalone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants