Skip to content

Commit

Permalink
A better intro/description to the usePreloadedQuery hook (#3453)
Browse files Browse the repository at this point in the history
Summary:
Instead of straight away asking the reader to go through the code and then understand what the hook does, the committed line gives a better intro of what the hook does. Also, what the inputs to the hook are and what it's output is. I feel like this important detail should be highlighted better. It gives a better context before reading the code

Pull Request resolved: #3453

Reviewed By: josephsavona

Differential Revision: D27764874

Pulled By: kassens

fbshipit-source-id: a34aae1f403d5166f69b27c156758b3c52e59f07
  • Loading branch information
AdityaDonthy authored and facebook-github-bot committed Apr 14, 2021
1 parent 9fc0fb6 commit d8bd877
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion website/docs/guided-tour/rendering/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Sample response:

## Rendering Queries

To *render* a query in Relay, you can use the `usePreloadedQuery` Hook:
To *render* a query in Relay, you can use the `usePreloadedQuery` hook. `usePreloadedQuery` takes a query definition and a query reference, and returns the corresponding data for that query and reference.

```js
import type {HomeTabQuery} from 'HomeTabQuery.graphql';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Sample response:

## Rendering Queries

To *render* a query in Relay, you can use the `usePreloadedQuery` Hook:
To *render* a query in Relay, you can use the `usePreloadedQuery` hook. `usePreloadedQuery` takes a query definition and a query reference, and returns the corresponding data for that query and reference.

```js
import type {HomeTabQuery} from 'HomeTabQuery.graphql';
Expand Down

0 comments on commit d8bd877

Please sign in to comment.