Skip to content
Snippets Groups Projects
Commit 1519d852 authored by francoisdillinger's avatar francoisdillinger
Browse files

Some commented psuedo-code

parent b939fe80
No related branches found
No related tags found
No related merge requests found
......@@ -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}/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment