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

138
Visualizações
Cannot read properties of undefined (reading 'up') in styled Material UI

I am Getting the error Uncaught TypeError: Cannot read properties of undefined (reading 'up') while running the below code: I could not compile my react js

At Index.js

import React from 'react';

import ReactDOM from 'react-dom/client';

import './index.css';

import App from './App';

import reportWebVitals from './reportWebVitals';

import { ThemeProvider } from '@mui/material';

import { theme } from './Components/Theme';


const root = ReactDOM.createRoot(document.getElementById('root'));

root.render(

  <React.StrictMode>

    <ThemeProvider theme={theme}>
      <App />
    </ThemeProvider>

  </React.StrictMode>

);

reportWebVitals();

At Theme.js Now at the theme.js using material ui Anyone help me.

import { createTheme } from "@mui/material";

export const theme = createTheme({

palette: {
    primary: {
        main: "#000",
        light: "#543"
    },
    secondary: {
        main:"#arbs3",
    },
    otherCo: {
        main:"#999"
    }
}

})

Then At NavBar.jsx

const SearchIcon = styled(Box)(({theme})=>({

    display: 'none',
    padding: '1rem',
    gap: '12px',
    alignItems: 'center',
    //small or greater so We used up
    [theme.breakpoints.up('sm')]: {
        display: 'flex',
    }
}))


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

0

Everything looks good to me.

Only thing that you need to check is that you are using right import for styled() function.

You should import it like this:

import {styled} from "@mui/material/styles"
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