Skip to content

Commit 46a45c3

Browse files
mabuyojerelmiller
andauthored
docs: add links out to hooks to make the page more useful (#13201)
The [page on React hooks](https://www.apollographql.com/docs/react/api/react/hooks) is our 7th most popular docs page from Q1 for questions using our Ask AI component. When visiting the page, I can see why. The page tells you to look at the sidebar, but you have to scroll all the way down on the sidebar to get to what you want, and even then, it's a bit unclear what you're supposed to click on. Some of the questions we're getting: "Where are the hooks in the sidebar?" "What are all of your hooks?" "What all hooks are available?" "I don't understand which hook I'm supposed to select" "where are the docs on useFragment?" "take me to the useLazyQuery page" This PR adds clear links to the hooks. Also worth noting that this page isn't actually discoverable through the sidebar, so they may be getting here through an old link, or direct Google search results. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated React hooks API reference documentation with improved descriptions, enhanced page structure, and better organization for easier navigation. * Added comprehensive navigation links to individual Apollo Client React hook API reference pages. * Extended documentation to include experimental hooks API reference materials. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
1 parent 95bab38 commit 46a45c3

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

docs/source/api/react/hooks.mdx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
---
22
title: Hooks
3-
description: Apollo Client react hooks API reference
3+
subtitle: Reference entries for Apollo Client React hooks
4+
description: Find API reference pages for each Apollo Client React hook, including experimental hooks.
45
minVersion: 3.0.0
56
---
67

7-
{/* @import {MDXProvidedComponents} from '../../../shared/MdxProvidedComponents.js' */}
8+
This page lists API reference entries for Apollo Client React hooks:
89

9-
This page has been split into individual hook pages. Select a hook from the navigation sidebar to view its documentation.
10+
- [`useQuery`](./useQuery)
11+
- [`useLazyQuery`](./useLazyQuery)
12+
- [`useMutation`](./useMutation)
13+
- [`useSubscription`](./useSubscription)
14+
- [`useFragment`](./useFragment)
15+
- [`useApolloClient`](./useApolloClient)
16+
- [`useReactiveVar`](./useReactiveVar)
17+
- [`useSuspenseQuery`](./useSuspenseQuery)
18+
- [`useBackgroundQuery`](./useBackgroundQuery)
19+
- [`useReadQuery`](./useReadQuery)
20+
- [`useLoadableQuery`](./useLoadableQuery)
21+
- [`useQueryRefHandlers`](./useQueryRefHandlers)
22+
- [Experimental hooks](./hooks-experimental)

0 commit comments

Comments
 (0)