import React, { useState } from 'react'; import ReactDOM from 'react-dom'; import CssBaseline from '@material-ui/core/CssBaseline'; import { ThemeProvider } from '@material-ui/core/styles'; import theme from "./theme"; import Header from './components/Header/Header'; import Timer from "./pages/Timer/Timer"; import Scoreboard from "./pages/Scoreboard/Scoreboard"; import Contribute from "./pages/Contribute/Contribute"; const App = () => { const [page, setPage] = useState('app'); const [recentSolutions, setRecentSolutions] = useState([]); const Page = ({ page }) => { switch (page) { case 'app': return ( ); case 'scoreboard': return (); case 'contribute': return (); default: return (

This text is rendered outside of Header component, but interacting with Header can influence content of this page!

) } }; return (
); }; document.body.style.overflow = "hidden"; ReactDOM.render(, document.getElementById('root'));