Skip to main content
100%

Dispatch multiple actions from ngrx effect

✓ Published0🌍 Public
Aackuser
Last edited Apr 25, 2018
Created on Jan 16, 2020

This example demonstrates an NgRx effect that dispatches multiple actions in response to a single search action. The effect listens for `SearchActions.SEARCH` and, when triggered, uses `switchMap` to transform the incoming action into an array containing two new actions: `FetchPanel1Data` and `FetchPanel2Data`, each carrying the original query payload. The code shows how RxJS operators and NgRx Effects can batch related side-effect dispatches, though it does not include the actual data-fetching logic or rendering—only the action emission pattern is visible.

AI-generated description

Similar vizzes