Problem with starting component

Hi. We started our project with one of previous version of react_on_rails. And as i know, we should export not a component like

export default (props) => (<HelloWorld {…props} />);

But in new versions it looks like:

export default class HelloWorld extends React.Component

Could you help me, with version of React On Rails, were mechanism was export default (props) => (<HelloWorld {…props} />);

Aloha @Maksim_Rukomoynikov!

The current version of React on Rails takes either a React component or a “generator function” in the view helper react_component.

So either syntax should be fine.

  1. React Component
  2. Generator Function