Main problem with Mixin is that their implementations overlap by accident, but hooks cannot.
Easy to snowball complexity. Making existing components frail to modify.
MixinOne.handleChange
and MixinTwo.handleChange
cannot be used together).const myDataMixin = { getData: async() => { const response = await fetch('http://localhost:8000/api/data'); return await response.json() } } // class component React.createClass({ mixins: [myDataMixin], componentDidMount() { const data = this.getData(); } render() { // ... } })