Skip to content Skip to sidebar Skip to footer

Problems With Material-ui Components

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 lin

Solution 1:

You'll either need to use an ES6 transpiler such as babel to convert your code to JS that current browsers can understand, or not use fat-arrow functions:

handleToggle() {
  this.setState({open: !this.state.open});
};

Solution 2:

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.

Post a Comment for "Problems With Material-ui Components"