Dispatching Actions

Learn how to dispatch an NgRx action from the Angular component.

Introduction to dispatch()

In our application, when an event occurs, the component dispatches an action. This is accomplished by calling the NgRx store’s dispatch() function.

The first argument to the dispatch() function is an instance of an action. In our project, we have already defined the action named getProductsAction().

Get hands-on with 1200+ tech skills courses.