Help us help you! Please choose one:
react-rails, so I've included the stack trace and the exact steps which make it crash.react-rails with another library, but I'm having trouble. I've described my JavaScript management setup (eg, Sprockets, Webpack...), how I'm trying to use this other library, and why it's not working.(Describe your issue here)
I wrote a simple component and I want to set its defaultProps. But this weird error occurred. How am I supposed to deal with this?

Thank you very much.
I suspect that this requires a different Babel setting than the default in react-rails. You could try customizing BabelTransformer https://github.com/reactjs/react-rails/blob/master/lib/react/jsx/babel_transformer.rb
Sorry, I use createClass so I don't have much experience here! 馃槵
You need Babel stage: 0 for static properties to work on ES6 Classes. We use stage2 and write ours like this.
class Foo extends Component {}
Foo.propTypes = {};
Foo.defaultProps = {};
export default Foo;
Thanks @coryasato ! Stage 2 is safer than stage 0 right? I will use stage 2.
Not clear to me, how do I add stage2 to react-rails?
Most helpful comment
Not clear to me, how do I add stage2 to
react-rails?