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

223
Views
Failed prop type: ForwardRef(Button): prop type `component` is invalid. Material UI - React

I'm trying to import Material UI onto my project with react. but i'm getting this error.

 Warning: Failed prop type:
 ForwardRef(Button): prop type `component` is invalid; it must be a
 function, usually from the `prop-types` package, but received
 `undefined`. This often happens because of typos such as
 `PropTypes.function` instead of `PropTypes.func`.

I'm following the usage guide from Material UI's site

material_test.js

import React, { Component } from 'react';
import Button from '@mui/material/Button';

export default class MaterialTest extends Component {

    render() {
        return (
            <Button>Hello World</Button>
        );
    }
}

but with a div works fine:

import React, { Component } from 'react';
import Button from '@mui/material/Button';

export default class MaterialTest extends Component {

    render() {
        return (
            <div>Hello World</div>
        );
    }
}

I have this on my package.json

"dependencies": {
    "@emotion/react": "^11.7.1",
    "@emotion/styled": "^11.6.0",
    "@mui/material": "^5.2.7",
    (...)
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    (...)
}

I'm routing this from another view to {localhost}:3000/material_test

about 4 years ago · Juan Pablo Isaza
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!