React/Material-UIでheaderを実装①


./components/ui/Header.js
import { AppBar, Toolbar } from "@material-ui/core";
import React from "react";

const Header = () => {
  return (
      <AppBar>
        <Toolbar>Header</Toolbar>
      </AppBar>
  );
};

export default Header;
App.js
import "./App.css";
import Header from "./components/ui/Header";

function App() {
  return (
    <div className="App">
      <Header />
      Hello Material-UI!
    </div>
  );
}

export default App;