Material-UI组件的问题 [英] Problems with Material-UI components

查看:107
本文介绍了Material-UI组件的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆