mirror of
https://github.com/zhigang1992/apollo.git
synced 2026-04-29 12:25:35 +08:00
Update docs/source/intro/benefits.md
Co-Authored-By: Peggy Rayzis <peggyrayzis@gmail.com>
This commit is contained in:
@@ -84,7 +84,7 @@ const GET_DOGS = gql`
|
||||
|
||||
Here, we're describing the shape of the object we want to receive from the server. GraphQL takes care of combining and filtering the data while returning exactly what we ask for.
|
||||
|
||||
How do we use this query in our app? Apollo Client builds off of GraphQL's declarative approach to data fetching. In a React app, all of the logic for retrieving your data, tracking loading and error states, and updating your UI is encapsulated in a single `useQuery` Hook. This encapsulation makes composing your data fetching components with your presentational components a breeze! Let’s see how to fetch GraphQL data with Apollo Client in a React app:
|
||||
How do we use this query in our app? Apollo Client builds off of GraphQL's declarative approach to data fetching. In a React app, all of the logic for retrieving your data, tracking loading and error states, and updating your UI is encapsulated in a single `useQuery` hook. This encapsulation makes composing your data fetching components with your presentational components a breeze! Let’s see how to fetch GraphQL data with Apollo Client in a React app:
|
||||
|
||||
```jsx
|
||||
function Feed() {
|
||||
|
||||
Reference in New Issue
Block a user