for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import { compose, branch, renderComponent, renderNothing } from 'recompose';
import { graphql } from 'react-apollo';
import { getProfileInfo } from 'services/graphQLQuery';
import ProfileComponent from 'components/ProfileComponent';
export default compose(
graphql(getProfileInfo, {
name: 'profile'
}),
branch(
({ profile }) => profile.loading || profile.errors || !profile,
renderComponent(renderNothing())
)
)(ProfileComponent);