From 1519d852c116f2125bedca7a98351c74a1794a21 Mon Sep 17 00:00:00 2001 From: francoisdillinger <elmojester@gmail.com> Date: Mon, 17 Apr 2023 02:53:57 -0500 Subject: [PATCH] Some commented psuedo-code --- frontend/src/App.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/frontend/src/App.js b/frontend/src/App.js index a6f128a..7fec7f5 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -51,6 +51,27 @@ function App() { }; }, []); + + + + + // import { useState, useEffect } from 'react'; + + // function MyComponent() { + // const [count, setCount] = useState(0); + + // useEffect(() => { + // const interval = setInterval(() => { + // setCount(count => count + 1); + // }, 1000); + + // return () => clearInterval(interval); + // }, []); // run only once when component mounts + + // return <div>{count}</div>; + // } + + return ( <div className="app" data-theme={theme? 'dark' : 'light'}> <DarkModeToggleButton handleDarkModeToggle={handleDarkModeToggle}/> -- GitLab