Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!