Switch unnecessary let to const
This commit is contained in:
parent
abb92726ab
commit
0f2eba8733
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ export default function useInterval(callback, delay) {
|
||||||
savedCallback.current();
|
savedCallback.current();
|
||||||
};
|
};
|
||||||
if (delay !== null) {
|
if (delay !== null) {
|
||||||
let id = setInterval(tick, delay);
|
const id = setInterval(tick, delay);
|
||||||
return () => clearInterval(id);
|
return () => clearInterval(id);
|
||||||
}
|
}
|
||||||
}, [delay]);
|
}, [delay]);
|
||||||
|
|
Loading…
Reference in a new issue