Returns stateful values and a function to update them. Upon invocation of setState, the nextState is assigned
synchronously, and the component is re-rendered. After the ms the currState is set to nextState and component
is re-rendered again.
A stateful value.
A delay after which currState is synchronized with nextState.
Returns stateful values and a function to update them. Upon invocation of
setState, thenextStateis assigned synchronously, and the component is re-rendered. After themsthecurrStateis set tonextStateand component is re-rendered again.