January 2019
Intermediate to advanced
460 pages
10h 33m
English
The complete HoC workflow requires you to have the HoC Query method set up, too. Otherwise, you won't be able to see why this approach has some advantages over the other one.
So, if you have undone the Query HoC, you should insert the code again, in order to test the mutation HoC. You can also skip to the next section, where you will learn how to use the Mutation component.
Follow these instructions to set up the mutation HoC:
import { graphql, compose } from 'react-apollo';
const ADD_POST = gql` mutation addPost($post : PostInput!) { addPost(post : $post) { id text user { username avatar ...Read now
Unlock full access