I'm looking at a React/Redux example here:
http://redux.js.org/docs/basics/ExampleTodoList.html
And notice the following is never done:
const CommentForm = React.createClass({
render: function() {
return (
<div className="commentForm">
</div>
);
}
});
Instead arrow functions are used instead of classes.
const Todo = ({ onClick, completed, text }) => (
<li
onClick={onClick}
style={{
textDecoration: completed ? 'line-through' : 'none'
}}
>
{text}
</li>
)
Why is this and when do you have to implement the render method?