Home / Companies / Apollo / Blog / Post Details
Content Deep Dive

Apollo Client, now with React Hooks

Blog post from Apollo

Post Details
Company
Date Published
Author
Hugh Willson
Word Count
1,059
Company Posts That Month
2
Language
English
Hacker News Points
-
Post removed?
No
Summary

Hugh Willson from the Apollo team is thrilled to announce that Apollo Client now supports React Hooks, which are a new way to write stateful components while avoiding classes. The three hooks available are `useQuery`, `useMutation`, and `useSubscription`. These hooks offer advantages over previous APIs, such as reduced bundle size and less boilerplate code. To get started with hooks, users can install the `@apollo/react-hooks` package after setting up their Apollo Client instance. Existing Apollo projects can be migrated to hooks by reading the migration guide. The new hooks make fetching data more straightforward and reduce unnecessary data management code, making components easier to reason about. Additionally, hooks support multiple mutations in a single component without nesting issues, and they improve TypeScript support for Apollo Client. This release also includes lazy evaluation for queries and new API documentation that emphasizes hooks as the recommended path for newcomers. The Apollo team thanks the community for their help in developing the Apollo hooks API.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Developer Experience 1 29 20 16 -43%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.