Class LiftedState
Represents a state wrapper used by Redux DevTools for debugging and time-travel functionality. This state maintains the action history, computed states, and configuration settings needed for development tools to function.
Implements
Inherited Members
Namespace: Unity.AppUI.Redux.DevTools
Assembly: Unity.AppUI.Redux.dll
Syntax
[Serializable]
public record LiftedState : IEquatable<LiftedState>
Remarks
The lifted state tracks:
- Action history with unique IDs
- Computed states at each action
- Staging and skipping of actions
- Time-travel position via currentStateIndex
- DevTools configuration state (locked/paused)
Constructors
LiftedState()
Initializes a new instance of the Lifted
Declaration
public LiftedState()
LiftedState(object, DevToolsConfiguration)
Initializes a new instance of the Lifted
Declaration
public LiftedState(object initialCommitState, DevToolsConfiguration options)
Parameters
Type | Name | Description |
---|---|---|
object | initialCommitState | The initial application state to commit. |
Dev |
options | Configuration options controlling DevTools behavior. |
Remarks
Sets up initial state with:
- Action ID counter starting at 1
- Initial action (type: @@INIT) at index 0
- Empty skipped actions set
- DevTools configuration from options
Fields
actionsById
Gets or sets the mapping of action IDs to their corresponding lifted actions. Index 0 always contains the initialization action.
Declaration
public Dictionary<int, LiftedAction> actionsById
Field Value
Type | Description |
---|---|
Dictionary<int, Lifted |
committedState
Gets or sets the last confirmed application state. This represents the baseline state for computing future states.
Declaration
public object committedState
Field Value
Type | Description |
---|---|
object |
computedStates
Gets or sets the list of computed states resulting from action application. Each state represents the application state after applying actions up to that index.
Declaration
public List<ComputedState> computedStates
Field Value
Type | Description |
---|---|
List<Computed |
currentStateIndex
Gets or sets the index of the currently selected state in the time-travel sequence. -1 represents the initial state before any actions.
Declaration
public int currentStateIndex
Field Value
Type | Description |
---|---|
int |
isLocked
Gets or sets whether the DevTools are locked, preventing state changes. When true, dispatched actions are blocked from modifying state.
Declaration
public bool isLocked
Field Value
Type | Description |
---|---|
bool |
isPaused
Gets or sets whether action recording is paused. When true, new actions are not added to the action history.
Declaration
public bool isPaused
Field Value
Type | Description |
---|---|
bool |
nextActionId
Gets or sets the incrementing identifier for the next action. Used to assign unique IDs to new actions as they are dispatched.
Declaration
public int nextActionId
Field Value
Type | Description |
---|---|
int |
skippedActionIds
Gets or sets the set of action IDs that are currently disabled/skipped. Skipped actions are temporarily removed from state computation.
Declaration
public HashSet<int> skippedActionIds
Field Value
stagedActionIds
Gets or sets the ordered list of action IDs representing the current action sequence. Used for maintaining action order and time-travel capabilities.
Declaration
public List<int> stagedActionIds