Returns an array of values representing the current state and a function to update the state.
The type of the state.
Optional
Optional initial state.
Returns an array of values representing the current state and a function to update the state.