InitedState<T> constructor

InitedState<T>(
  1. T initialState
)

Creates and registers an initial state.

Implementation

InitedState(T initialState) : uniqueKey = UniqueKey() {
  Reactivity._states[uniqueKey] = BuildState<T>(
    uniqueKey: uniqueKey,
    state: initialState,
  );
}