React hook for using controllable state.
Read more: https://medium.com/quick-code/writing-ui-components-with-optionally-controllable-state-86e396a6f1ec
Please use useControlledState from @react-stately/utils
instead. It's not a drop-in replacement since the signature is a little different.