Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

214
Visualizações
React js Material ui No se pueden leer las propiedades de undefined (leyendo 'arriba')

Actualicé a la última versión, recibo el siguiente mensaje de error: TypeError: Cannot read properties of undefined (reading 'breakpoints')

paquete.json:

 "@emotion/react": "^11.8.1", "@emotion/styled": "^11.8.1", "@mui/icons-material": "^5.4.4", "@mui/material": "^5.4.4", "@mui/styles": "^5.4.4", "react": "^17.0.2", "react-dom": "^16.13.1",

Código:

 import { createTheme, useTheme, ThemeProvider, } from "@mui/material"; import { makeStyles } from '@mui/styles'; .... const useStyles = makeStyles((theme) => ({ root: { display: "flex" }, drawer: { [theme.breakpoints.up("lg")]: { width: drawerWidth, flexShrink: 0 } }, appBar: { [theme.breakpoints.up("lg")]: { width: `calc(100% - ${drawerWidth}px)`, marginLeft: drawerWidth } }, menuButton: { marginRight: theme.spacing(2), [theme.breakpoints.up("lg")]: { display: "none" }, backgroundColor: darkState ? grey[900] : blue[500] }, // necessary for content to be below app bar toolbar: theme.mixins.toolbar, drawerPaper: { width: drawerWidth, color: "#ffffff", backgroundColor: darkState ? grey[900] : blue[500] }, content: { flexGrow: 1, padding: theme.spacing(3) } })); const classes = useStyles(); const theme = useTheme(); ... return ( <ThemeProvider theme={darkTheme}> <div className={classes.root}> .... </div> </ThemeProvider> );

Ejemplo: Codesandox

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

poner ThemeProvider en el componente superior

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda