withApolloRedux.js basic HOC

import { connect } from 'react-redux'
import { compose } from 'redux'

const withApolloRedux = ({ queries }, { mutations }, mapStateToProps, WrappedComponent) =>
  compose(
    ...queries,
    ...mutations,
    connect(mapStateToProps),
  )(WrappedComponent)

export default withApolloRedux

 

https://github.com/helabenkhalfallah/react-apollo-redux-graphql/blob/master/src/commons/hocs/withApolloRedux.js

https://github.com/helabenkhalfallah/react-apollo-redux-graphql/blob/master/src/users/pages/UserListPage.jsx

 

best practices reactjs