generator-react-webpack-redux
generator-react-webpack-redux copied to clipboard
Error when creating ES6 functions
Hi. I am writing functions inside the component class in my react js project. when I write like this function:
saySomething = (something) => { console.log(something); }
an error occurs.

What should I do?
Thank you.
You can fix this by installing the babel-plugin-transform-class-properties package and adding it to your conf/webpack/Base.js
Ref: https://stackoverflow.com/questions/42063854/arrow-function-syntax-not-working-with-webpack?answertab=active#tab-top