I seem to be having a problem with this module that was exported in the correct manner but when it is imported and i get the error that was stated above. can anyone help? anything is appreciated Here is the code of the module
import React from "react";
import { makeStyles } from "@material-ui/core/styles";
import Typography from "material-ui/styles/typography";
const useStyles = makeStyles(theme => ({
maindiv: {
float: 'left',
},
}));
export default function Home() {
console.log("inside the function");
const classes = useStyles();
return (
<div className={classes.maindiv}>
<Typography variant="h5">this is it</Typography>
</div>
);
}
Your 'Typography' import is wrong. Use import {Typography} from '@material-ui/core'; instead of import Typography from "material-ui/styles/typography";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.