- useActualState<S>(initialState?): readonly [MutableRefObject<S>, Dispatch<SetStateAction<S>>]
Parameters
Optional
initialState: S | (() => S)
Returns readonly [MutableRefObject<S>, Dispatch<SetStateAction<S>>]
- An array containing the mutable reference to the state and the state update function
.
Returns an array of values representing the current state and a function to update the state.