Run a function after a delay that you can start again or clear.
This is custom React hooks, you need to follow the Basic Rules when you use it.
The message appears two seconds after the click.
const useTimeout = (
callback: () => void,
delay: number,
options?: { autoInvoke?: boolean },
) => { start: () => void; clear: () => void }