What problem does it solve?
DBX Core Actions address the complexity of coordinating asynchronous operations in Angular by offering a typed, declarative action system and an ActionContextStore that centralizes state management and lifecycle handling.
Core Features & Use Cases
- 7-state action state machine guides action flow from idle to success or error.
- ActionContextStore: immutable, observable-driven state management that coordinates values, triggers, and results.
- Directive-composition model: build complex workflows by composing context, value providers, handlers, and UI feedback directives.
- Type safety & generics: support for input type T and output type O across actions.
- Robust cleanup & lifecycle: automatic unsubscription and lifecycle safety to prevent leaks.
Use cases: API calls, form submissions, multi-step tasks, and complex workflows requiring centralized coordination.
Quick Start
Start by creating a root dbxAction container to provide the ActionContextStore, attach a dbxActionHandler to process results (returning an Observable or using the context.resolve()), and add a value provider (dbxActionValue or dbxActionForm) together with a dbxActionButton to trigger and optional UI directives for feedback.