import React, { useState } from 'react'; import ReactDOM from 'react-dom'; import { Typography, Paper, Container, } from "@material-ui/core"; import styled from 'styled-components'; 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 Scoreboard from "./components/Scoreboard/Scoreboard"; const App = () => { const [page, setPage] = useState('app'); return ( This is the {page} page! { (page === 'scoreboard')? () : ( This text is rendered outside of Header component, but interacting with Header can influence content of this page! ) } ); }; const Root = styled.div` `; ReactDOM.render(, document.getElementById('root'));
This text is rendered outside of Header component, but interacting with Header can influence content of this page!
Header