import React from 'react';
import createElement from 'recompose/createElement';
import createHelper from 'recompose/createHelper';

const componentDidMount = callback => BaseComponent =>
  class extends React.Component {
    componentDidMount = () => callback(this)
    render = () => createElement(BaseComponent, this.props)
  };

export default createHelper(componentDidMount, 'componentDidMount');

/* eslint react/require-render-return:0 */

import React from 'react';
import createElement from 'recompose/createElement';
import createHelper from 'recompose/createHelper';

const componentDidMount = callback => BaseComponent =>
  class extends React.Component {
    componentDidMount = () => callback(this)
    render = () => createElement(BaseComponent, this.props)
  };

export default createHelper(componentDidMount, 'componentDidMount');

disable react/require-render-return