Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

128
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda