Returns stateful values and a function to update them. When you call setState, value is assigned synchronously
and the component re-renders. After ms, debouncedValue is synchronized with value, and the component re-renders
again.
A stateful value.
A delay after which debouncedValue is synchronized with value.
Returns stateful values and a function to update them. When you call
setState,valueis assigned synchronously and the component re-renders. Afterms,debouncedValueis synchronized withvalue, and the component re-renders again.