Satyam
Satyam

Reputation: 647

I am getting (TypeError: Cannot read property 'down' of undefined)

I have a style file that has

import { makeStyles } from "@material-ui/styles";

export const useStyles = makeStyles((theme) => ({
  paperStyle: {
    width: 400,
    height: 320,
    display: "flex",
    justifyContent: "center",
    alignItems: "center",
    [theme.breakpoints.down("xs")]: {
      width:200
    },
  },
  animationStyle: {
    width: "90%",
    height: "90%",
  },
}));

I feel everything is correct, I am not understanding why is this giving me that error? Where am I going wrong? Has something changed in the Alpha version of material-ui? Please help.

Here is the link for CodeSandbox

Upvotes: 0

Views: 250

Answers (1)

Anurag Parmar
Anurag Parmar

Reputation: 293

maybe try replacing

import { makeStyles } from "@material-ui/styles";

with

import { makeStyles } from "@material-ui/core/styles";

Upvotes: 2

Related Questions