-
Notifications
You must be signed in to change notification settings - Fork 407
docs: explain dispatch
utility
#2153
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
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 5d4a130. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 4 targetsSent with 💌 from NxCloud. |
BundleMon (Integration Projects)Unchanged files (2)
No change in files bundle size Final result: ✅ View report in BundleMon website ➡️ |
docs/concepts/store/README.md
Outdated
const route = inject(ActivatedRoute); | ||
|
||
route.params | ||
.pipe( | ||
map(params => params.invoiceId), | ||
distinctUntilChanged(), | ||
takeUntilDestroyed() | ||
) | ||
.subscribe(invoiceId => { | ||
this.getInvoiceLines(invoiceId); | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A simpler example would be better, so the utility is not lost in all the code.
Potentially:
// An action declared somewhere in your app
class Greet {
static readonly type = 'Greet';
constructor ( public greeting: string ) { }
}
// Then, in your component
export class MyComponent {
greet = dispatch(Greet);
constructor() {
// the `this.greet` function has the same signature as the action's constructor!
this.greet("Hello world!");
}
}
It is good to mention the utility here, but I think it would be good to eventually have a page dedicated to these utilities.
Code Climate has analyzed commit 5d4a130 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 95.2% (0.0% change). View more on Code Climate. |
No description provided.