Apollo hooks: Why and how to use

This is a small blog post about migrating from Apollo Query and Mutation components to hooks.

TL;DR

You can use Apollo hooks to simplify your components and nicely separate concerns. First, you fetch data, then handle loading and error states and finally render the data. No mixture of JSX and conditionals anymore!

Thanks @Will for the invitation to share this post here

4 Likes