Our mission is to make Apollo Client the most modern and frictionless state management solution for React developers. As the React community has evolved and pioneered new UI development best practices over time, we’ve ensured that Apollo Client adopts and upholds those practices. In keeping with that tradition, today we’re thrilled to announce the addition of React Hooks to Apollo Client! 🚀
Introduced in React 16.8, Hooks are a new way to write stateful components while avoiding the pitfalls of classes. Apollo Client now includes three hooks that you can drop into your app, anywhere you currently use a corresponding higher-order component or render prop component:
useSubscription. These hooks are simple to get started with, and they have many advantages over the previous APIs, including bundle size reductions and less boilerplate code.
One of the things we love most about React is that the core team and the community are always striving to improve the React developer experience, and Hooks are a prime example of this. We encourage everyone to start using them!