0
Hello, I installed the material-ui in React to do tests, but Appbar does not show on screen. I created an Appbar component that uses the Appbar material-ui, then used it in the App class, and it still didn’t work.
Codes:
Appbar.js:
import React from "react"
import { AppBar, Toolbar, Typography, List, ListItem, ListItemText } from "material-ui"
class Appbar extends React.Component {
render() {
return (
<div>
<AppBar color="primary" position="static">
<Toolbar>
<Typography variant="title" color="inherit">
InstaPets
</Typography>
<List component="nav">
<ListItem component="div">
<ListItemText>
<a href="facebook.com">Feed</a>
</ListItemText>
<ListItemText>
<a href="facebook.com">Post</a>
</ListItemText>
<ListItemText>
<a href="facebook.com">Login/Register</a>
</ListItemText>
</ListItem>
</List>
</Toolbar>
</AppBar>
</div>
)
}
}
export default Appbar;
App.js:
import React from 'react';
import Appbar from "./components/Appbar"
class App extends React.Component {
render() {
return(
<Appbar/>
)
}
}
export default App;