Skip to content

Commit 6d5286a

Browse files
authored
Merge pull request #1257 from ryota-murakami/update/rtk-quer-doc
[docs:query] add useQuery() manual call example at overview
2 parents a6dc3cf + 5ac5882 commit 6d5286a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/rtk-query/overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ import { useGetPokemonByNameQuery } from './services/pokemon'
152152
export default function App() {
153153
// Using a query hook automatically fetches data and returns query values
154154
const { data, error, isLoading } = useGetPokemonByNameQuery('bulbasaur')
155-
155+
// Individual hooks are also accessible under the generated endpoints:
156+
// const { data, error, isLoading } = pokemonApi.endpoints.getPokemonByName.useQuery('bulbasaur')
157+
156158
// render UI based on data and loading state
157159
}
158160
```

0 commit comments

Comments
 (0)