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(component-store): add tapResponse signature with observer object #3829

Conversation

markostanimirovic
Copy link
Member

@markostanimirovic markostanimirovic commented Apr 3, 2023

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?

Closes #3739

What is the new behavior?

Another signature of the tapResponse operator is added. It accepts the observer object as an input argument. By using the new signature, we can also pass the finalize callback:

tapResponse({
  next: console.log, // required
  error: console.error, // required
  complete: () => console.log('complete'), // optional
  finalize: () => console.log('finalize'), // optional
})

Does this PR introduce a breaking change?

[ ] Yes
[x] No

@netlify
Copy link

netlify bot commented Apr 3, 2023

Deploy Preview for ngrx-io ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9f090cc
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/643d9a88d460930008a92f84
😎 Deploy Preview https://deploy-preview-3829--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 settings.

@markostanimirovic markostanimirovic force-pushed the feat/component-store/tap-response-observer branch 2 times, most recently from abcd6aa to d6a0778 Compare April 7, 2023 14:19
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.

🤘

@markostanimirovic markostanimirovic force-pushed the feat/component-store/tap-response-observer branch from d6a0778 to 9f090cc Compare April 17, 2023 19:14
@brandonroberts brandonroberts merged commit 3a5e5d8 into ngrx:master Apr 21, 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.

RFC: Introduce object signature for tapResponse and provide ability to pass finalize callback
3 participants