Effects are mainly used for isolating side effects from the component and so your component can be purer.
In a service-based Angular application, components are responsible for interacting with external resources directly through services. Instead, effects provide a way to interact with those services and isolate them from the components. Effects are where you handle tasks such as fetching data, long-running tasks that produce multiple events, and other external interactions where your components don’t need explicit knowledge of these interactions.
We can use different Rxjs operator for different scenarios like:
GitHub: https://github.com/funOfheuristic/ngrx-tutorial/tree/ngrx-effects
#angular #ngrx