i just started a reactJS project and when i decided to use material-ui it statrted throwing a lot of errors:
bundle.js:12441 Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the
prop-types
package. UsePropTypes.checkPropTypes()
to call them. Read more at http://ift.tt/2pPxRx8 Check the render method ofCardHeader
.
my App component looks like this:
import React from 'react';
import PropTypes from 'prop-types';
import NavBar from './common/NavBar';
import Logo from './common/Logo';
import MuiThemeProvider from 'material-ui/styles/MuithemeProvider';
class App extends React.Component {
render() {
return (
<MuiThemeProvider>
<div className="container-fluid">
<Logo />
<NavBar />
{this.props.children}
</div>
</MuiThemeProvider>
);
}
}
App.PropTypes = {
children: PropTypes.object.isRequired
};
export default App;
material-ui version: 0.20.0 react version: 15.0.2
Aucun commentaire:
Enregistrer un commentaire