Invokes a callback periodically while the component is mounted.
All functions that were scheduled with the same delay are invoked synchronously across all components that use this hook.
The callback arguments.
The callback to invoke.
Rest
The delay after which the callback must be invoked.
Varargs that are passed as arguments to the callback.
useInterval
Invokes a callback periodically while the component is mounted.
All functions that were scheduled with the same delay are invoked synchronously across all components that use this hook.