Decorator feature not working (unexpected token)
问题 Just tried to use decorators in React: import React from 'react'; import Fade from './Transitions/Fade' import withVisible from './withVisible' @withVisible() const App = props => <Fade visible={props.visible} duration={500}> Hello </Fade> export default App If I use the common way ( withVisible()(App) ) then it's working properly. (My guess is that NodeJS can't compile my code with the @ ) [Syntax error: Unexpected token (@) ] import React from 'react' const withVisible = () => Component =>