petehunt / react-howto

Your guide to the (sometimes overwhelming!) React ecosystem.
11.61k stars 770 forks source link

Fix documentation for React.createClass() over ES6 classes #78

Open andyfangaf opened 7 years ago

andyfangaf commented 7 years ago

You may see some talk about ES6 classes being the preferred way to create React components. This is untrue. Most people (including Facebook) are using React.createClass().

No where in the official docs did I see React.createClass being preferred over ES6 classes. Did you mean createReactClass, which auto-binds methods but requires you to load another module? I'm curious what the reasoning was for this comment.