Skip to content

docs(component-store): explain flattening operator policies - #5228

Open
MuslumYilmaz wants to merge 1 commit into
ngrx:mainfrom
MuslumYilmaz:docs/component-store-flattening-policy
Open

MuslumYilmaz wants to merge 1 commit into
ngrx:mainfrom
MuslumYilmaz:docs/component-store-flattening-policy

Conversation

@MuslumYilmaz

Copy link
Copy Markdown

What changes?

The ComponentStore effects guide demonstrates both switchMap and exhaustMap, but leaves their different policies for overlapping calls implicit. This adds a short explanation after the second example:

  • getMovie keeps the latest inner subscription.
  • getAllMovies ignores triggers while the active request runs; those triggers are not queued.
  • concatMap and mergeMap cover cases where each call needs to be processed.
  • Unsubscription is distinguished from aborting underlying work or undoing server-side effects.

The existing examples and the recommendation to use NgRx Signals for new projects are unchanged. The explanation is self-contained; one optional further-reading link compares the four operators.

Validation

  • Prettier 3.6.2 check passed using this repository's Markdown configuration.
  • Five executable checks using RxJS 7.8.0 passed: each operator's behavior with overlapping calls and a later trigger, plus teardown of the older switchMap subscription.
  • One Markdown file changed; no runtime/API or example-code changes.
  • The full NgRx workspace build and test suite were not run.

Disclosure

I am the founder of FrontendAtlas, which publishes the linked explanation. That page is free to read without an account; the broader platform also has paid features. Please judge the reference on its relevance, and feel free to omit it while retaining the clarification.

This documentation change was prepared with AI assistance; the behavior checks above were executed.

@netlify

netlify Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for ngrx-io ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 33a4346
🔍 Latest deploy log https://app.netlify.com/projects/ngrx-io/deploys/6ac34d4031efc10008fe1770
😎 Deploy Preview https://deploy-preview-5228--ngrx-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch has not been deployed

No deployments
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.

1 participant