1, pure function -
- Component is not instantiated, overall rendering performance gains
- Component can not access
this
objects - The method of assembly can not access the life-cycle
- Stateless components can only access the input of
props
the sameprops
will get the same rendering results, there will be no side effects
2,React.createClass
- React.createClass binding function method will automatically lead to unnecessary performance overhead
- React.createClass of mixins is not natural, intuitive
3,React.Component
react.Component form ES6 to create thereact
assembly, is extremely React currently has recommended way to create a state assembly, with respect toReact.createClass
better achieve code reuse.
Binding this application can bind call apply props. a first assembly component when using this super