April 2020
Intermediate to advanced
716 pages
18h 55m
English
While writing the function to define the component, we will compose the content and behavior of the component. The Home component will contain a Material-UI Card with a headline, an image, and a caption, all styled with the styles we defined previously and returned by calling the useStyles() hook.
mern-skeleton/client/core/Home.js:
export default function Home(){ const classes = useStyles() return ( <Card className={classes.card}> <Typography variant="h6" className={classes.title}> Home Page </Typography> <CardMedia className={classes.media} image={unicornbikeImg} title="Unicorn Bicycle"/> <CardContent> <Typography variant="body2" component="p"> Welcome to the MERN Skeleton home page. </Typography> </CardContent> </Card> ...Read now
Unlock full access