Material-UI组件的问题 [英] Problems with Material-UI components
问题描述
我正在尝试使用 http://www.material-ui.com带有ReactJS的Material-UI中的/#/components/drawer (示例).
I'm trying to use the http://www.material-ui.com/#/components/drawer (Docked Example) component from Material-UI with ReactJS.
我在以下行中的"="上收到一条错误消息:
I get error an error on the "=" in the following line:
handleToggle = () => this.setState({open: !this.state.open});
我在其他一些组件上也遇到相同的错误.我正在使用Material-UI的最新版本.
I get the same error on some other components as well. I'm using the latest version of Material-UI.
与此版本相同: http://www.material-ui.com/# /components/table (复杂示例)上的以下代码:
Same with this one: http://www.material-ui.com/#/components/table (Complex Example) on the following code:
handleToggle = (event, toggled) => {
有什么想法吗?
谢谢.
推荐答案
感谢您的输入.我只需要在加载程序中添加"stage-0"并安装"babel-preset-stage-0".现在一切正常.再次感谢.
Thanks for the input. I just had to add "stage-0" to my loaders and install "babel-preset-stage-0". Now everything works. Thanks again.
这篇关于Material-UI组件的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!