useInterval
The useInterval
hook is used to create an interval that executes a function every specified number of milliseconds. It is similar to the setInterval
function, but it is declarative and can be cancelled.
Please refer to the documentation for more information.