
Should I use React.createClass, ES6 Classes or stateless functional components? - jamesknelson
http://jamesknelson.com/should-i-use-react-createclass-es6-classes-or-stateless-functional-components/
======
ericclemmons
React.createClass if you want mixins, automatic binding of
"this.handleWhatever" methods, and Hot Module Replacement.

ES6 Classes if neither of these are a big deal to you, but you prefer classes
and still want HMR.

Functional components of you want terse, testable, potentially vdom-agnostic
UI components despite losing HMR capabilities (as of yet).

~~~
insin
Is the issue with functional components that they blow away the state of any
stateful components they contain with HMR?

If you install and run this Gist mini-project, you still get the HMR
experience with the functional component:

[https://gist.github.com/insin/02103c862ed3622f8b8b#file-
read...](https://gist.github.com/insin/02103c862ed3622f8b8b#file-readme-md)

