1import { useEffect, useRef } from 'react';
3// via: https://overreacted.io/making-setinterval-declarative-with-react-hooks/
4export default function useInterval(callback, delay) {
5 const savedCallback = useRef();
7 // Remember the latest callback.
9 savedCallback.current = callback;
12 // Set up the interval.
15 savedCallback.current();
18 let id = setInterval(tick, delay);
19 return () => clearInterval(id);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list