useIntervalを初期stopも可能なように更新

This commit is contained in:
harukin-expo-dev-env
2025-08-31 13:28:49 +00:00
parent 2711e0850e
commit 99dbada0c2

View File

@@ -24,6 +24,8 @@ export const useInterval = (fn: Fn, interval: number, autostart = true) => {
useEffect(() => {
if (autostart) {
setState("RUNNING");
}else{
setState("STOPPED");
}
}, [autostart]);
useEffect(() => {