📄️ Query
Queries are used to retrieve data from the store. They represent read-only operations that fetch specific information from the state and make it available for consumption in other parts of the application.
📄️ Command
Commands are the only actions that should modify the state of a store. The store base class offers the functions set, update, and mutate to perform state modifications. They are based on the native signal modification functions.
📄️ Effect
While commands and queries focus exclusively on the store without involving other services or components, effects are intended to enable store interaction with services from outside. Typically, effects come into play when dealing with asynchronous operations, such as executing HTTP calls, that either modify or retrieve information from the store's state.
📄️ Event
By utilizing events and event handlers, you can establish communication between stores, propagate side effect results, and coordinate actions across different parts of your application. This decoupled approach enables a more modular and flexible architecture, allowing for better maintainability and extensibility of your Angular application.