I am learning NGXS state management but cannot understand the meaning of DISPATCH word in this context which has been written on its documentation. Could you please clarify for me.
As I mentioned earlier action is a command that we can use to dispatch items from the store. For that, we need to inject Store service into our component and call dispatch function.
In a store like this dispatch
is how actions get sent. You might also think of it as "firing and action" or "sending an action". The way the store works is very well defined. You cannot just set a new value in the store, you must tell the store that some action has happened. That's what "dispatching" is.
When you dispatch an action the store received it, updates the store based on the action (using a "reducer") then informs any components in the system that the value of the store has changed.
So think of "dispatch" as the verb for telling the store that an action has happened.