useActualRef<S = undefined>( initialState?: S | () => S,): readonly [any, (dispatch: S | (prevState: S) => S) => void] Parameters
OptionalinitialState: S | () => S
Returns readonly [any, (dispatch: S | (prevState: S) => S) => void]
- An array containing the state reference and handleState function
Custom hook that creates a mutable reference to a state value and a function to update the state value.