The current templates relay on React.createClass which is deprecated starting in React 15.
Solution
The template should assume as little as possible about the user's browserify setup. The output has to be valid ES5 because we can't rely on JSX or ES6 support coming after in the transformation pipeline.
Functional components are just functions with some properties set, so I think they are adequate.
Support for functional components was added in React v0.14, released three years ago. Nonetheless, this would be a backwards-incompatible change so you should probably bump the version number if you merge this PR.
Tests
Tests pass.
The warning is gone in React 15.
The sample app (using React 0.14) still works fine.
Problem
The current templates relay on
React.createClass
which is deprecated starting in React 15.Solution
The template should assume as little as possible about the user's browserify setup. The output has to be valid ES5 because we can't rely on JSX or ES6 support coming after in the transformation pipeline.
Functional components are just functions with some properties set, so I think they are adequate.
Support for functional components was added in React v0.14, released three years ago. Nonetheless, this would be a backwards-incompatible change so you should probably bump the version number if you merge this PR.
Tests