In React 16, Facebook are deprecating the React.createClass() syntax for creating new components, preferring the new ES6 class method. Already from React 15.5.0, they start reminding you about this.
They favour replacing
You should absolutely upgrade to the new ES6 way but that involves some refactoring other parts of the app so if you just want the warnings to go away for now, you need to install the create-react-class npm module and then swap out the parts of your code where it says React.createClass for createReactClass. As they say, it really is a drop-in replacement.
[code language=”bash”]$ yarn add create-react-class[/code]
[code language=”bash”]$ npm install create-react-class —save
New Code (remember to import the module)
Very simple but not clearly documented anywhere I could find.