Settimeout React Hook
Simple hook to use Settimeout with
Mon, 27 Jun 2022
import { useEffect } from "react";
export default function App() {
useEffect(() => {
const timer = setTimeout(() => console.log("Timer Finished!"), 5000);
return () => clearTimeout(timer);
}, []);
return <p>Test</p>
}