我在我的控制檯此消息:我不能使用材料的UI組件更新後[email protected]
Failed Context Types: Required context
muiTheme
was not specified inAppBar
AppBar.js:158 Uncaught TypeError: Cannot read property 'prepareStyles' of undefined
我只是有一個AppBar在我的組件 我想它應該工作,但... 這裏我非常簡單的代碼:
import React from 'react';
import {AppBar} from 'material-ui';
export class MyComponent extends React.Component {
render() {
return (
<div>
<AppBar
title="Title"
/>
</div>
);
}
}
感謝幫助...
好吧,我明白了!非常感謝! –
它解決了我的問題。謝謝! –
爲什麼他們使它更復雜?如果我可以編寫更少的代碼來實現它,那將是非常好的。 – newguy