React offers multiple way of creating re-usable components, but which one to use, when and why depends on a number of factors.
I would say that, these days, you should limit yourself, to either
Stateless functional components(SFC) or
React ES6 classes.
- You need to have
state within a component: holding the value within an input, holding the open/close state of something etc
- You need lifecycle methods( eg when manipulating the DOM in an imperative way, using JQuery etc )
- You need to assign
refs for the component
If the above 3 points don’t apply to your use case then you can safely use a stateless functional component.
... read the whole story at www.jstwister.com.