State Manager
This node aggregates multiple inputs into a single state object.
The State Manager node collects various data streams and bundles them into one object, useful for managing complex component state.
The State Manager node allows you to define a set of inputs (using the "Number of Inputs" property). It collects the values from these inputs and, when triggered by Update, bundles them into a single State Object. It also passes the individual values through to corresponding outputs.
Configuration
| Data | Description |
|---|
| Number of Inputs | The number of dynamic input/output pairs to generate. Default: 3. |
Control
| Signal | Description |
|---|
| Update | Triggers the state update. Reads all inputs, updates the internal state object, and refreshes outputs. |
| Reset | Clears all stored values and the state object. |
| Data | Description |
|---|
| Input N | The Nth data input. |
| Alias N | A string name for this input. This name will be used as the key in the generated State Object. |
Outputs
Control
| Signal | Description |
|---|
| Updated | Triggered after the state has been updated. |
| Reset Done | Triggered after reset is complete. |
Combined Output
| Data | Description |
|---|
| State Object | A single object containing all input values, keyed by their Aliases (or default names). |
| Object ID | The ID of the generated State Object. |
Dynamic Outputs
| Data | Description |
|---|
| Output N | The value passed through from Input N. |
Usage
- Set Number of Inputs to 3.
- Alias 0: "username", Alias 1: "email", Alias 2: "age".
- Connect Text Inputs to Input 0 and Input 1, Number Input to Input 2.
- Connect a "Submit" button to Update.
- Use the State Object output to send the entire form data to a Create New Record node or API.
Detailed Behavior
- Aliases: If you provide an Alias (e.g., "firstName"), the State Object will have
{ firstName: "..." }. If left empty, it uses default keys like input0.
- Snapshot: The State Object represents a snapshot of the inputs at the moment Update was triggered.
Troubleshooting
- Old Data: The outputs only update when Update is triggered. If inputs change but Update isn't fired, the State Object remains stale.