Reasons I don't use React's ES6 class syntax:
- I like mixins! They should be applied carefully, but I find them easier to use than HOCs in many cases
- Some useful libraries also still ship mixins instead of HOCs, and it'd be annoying to convert a component to
createClass
definition because I decided to use a mixin
- Some useful libraries also still ship mixins instead of HOCs, and it'd be annoying to convert a component to
- I prefer defining propTypes/defaultProps in the component's body instead of as properties added after definition
- I like auto-bound event handlers
- I don't see any advantage to using ES6 classes for components
createClass
, find a way to accomplish the goal without a mixin ๐ )