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(daffio): add effect to sub to activated route #2987

Conversation

griest024
Copy link
Member

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:

What is the current behavior?

Fixes: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[ ] No

Other information

@griest024 griest024 added package: daff.io @daffodil/daff.io status: awaiting merge This PR has met all the requirements for merge and is waiting on an admin labels Aug 15, 2024
@griest024 griest024 self-assigned this Aug 15, 2024
@griest024 griest024 requested review from a team as code owners August 15, 2024 17:01
import { DaffRouterActivatedRoute } from '@daffodil/router';

// TODO: should this be moved to `@daffodil/router/state`?
export const daffioRouterActivatedRoute = createEffect(
Copy link
Member

Choose a reason for hiding this comment

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

What's the difference between this and a regular observable of the route? That it can be loaded via EffectModule?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah it felt appropriate to put it in an effect but there's no real functional benefit over just subbing in the AppModule

Copy link
Member

Choose a reason for hiding this comment

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

Is there a way that we can make something like "pseudoeffects" that automatically sub in the AppModule? I'd like to keep a safe distance ( as best we can) between @ngrx and anything router related.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh yeah we can use an APP_INITIALIZER, good idea

@griest024
Copy link
Member Author

closed in favor of #2988

@griest024 griest024 closed this Aug 15, 2024
@griest024 griest024 deleted the feat/daffio/add-activated-route-effect branch August 15, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: daff.io @daffodil/daff.io status: awaiting merge This PR has met all the requirements for merge and is waiting on an admin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants