Reputation: 106
I'm trying to upgrade Material UI from 0.14.4 to 0.15.0.
I have a custom theme and I'm following the changelog to avoid any error.
However, i'm facing a problem in the process.
Here are some screenshots of the problem. Does someone know where it comes from and how to fix it?
Here is the code where the 'Uncaught TypeError' come from :
thanks in advance for anyone having an insight/solution to my problem
Edit : Here is my code
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import getMuiTheme from 'material-ui/styles/getMuiTheme';
let MainApp = React.createClass({/*...*/});
ReactDOM.render((
<MuiThemeProvider muiTheme={getMuiTheme()}>
<MainApp />
</MuiThemeProvider>
), document.getElementById('react-root'));
Upvotes: 1
Views: 338
Reputation: 282
You need to add this to your code
static contextTypes = {
muiTheme: React.PropTypes.object
}
Add it where you need to access the muiTheme.
Since we both have updated our questions and answers the comments are not valid any more
Upvotes: 1