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

331
Views
¿Cómo resolver el error de llamada de gancho no válida al usar Material UI?

Soy nuevo en la codificación y tengo el siguiente error al agregar un icono MaterialUI

 import PersonIcon from '@mui/icons-material/Person'; function Header() { return ( <div> <PersonIcon /> <h2>Header file</h2> </div> ); } export default Header;

Al agregar me sale el siguiente error:

Error de consola al agregar

Tenga en cuenta que he instalado MaterialUI Core y también los iconos de MaterialUI. Cuando no agrego, todo funciona bien.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Prueba esto

 npm uninstall @material-ui/core @material-ui/icons

Después

 npm i @material-ui/core @material-ui/icons

Reinicie el servidor React

 npm start // OR yarn start

Avísame si funciona, Suerte

about 4 years ago · Juan Pablo Isaza Report

0

Debe envolver su aplicación en ThemeProvider :

índice.js:

 import * as React from 'react'; import ReactDOM from 'react-dom'; import { ThemeProvider, createTheme } from '@mui/material/styles'; import App from './App'; const theme = createTheme({ palette: { primary: { main: '#556cd6', }, secondary: { main: '#19857b', }, }, }); ReactDOM.render( <ThemeProvider theme={theme}> <App /> </ThemeProvider>, document.querySelector('#root'), );
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!