Skip to content

Commit

Permalink
Update README.md (#44)
Browse files Browse the repository at this point in the history
Updated TS example to reflect the new object parameters for RQ V5
  • Loading branch information
Corepex committed Mar 16, 2024
1 parent 5e5dedb commit 0ae1568
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,13 @@ import {

function App() {
// You can still use the auto-generated query key
const { data } = useQuery([usePetServiceFindPetsByStatusKey], () => {
// Do something here

return PetService.findPetsByStatus(['available']);
});
const { data } = useQuery({
queryKey: [usePetServiceFindPetsByStatusKey],
queryFn: () => {
// Do something here
return PetService.findPetsByStatus(['available']);
}
});

return (
<div className="App">
Expand Down

0 comments on commit 0ae1568

Please sign in to comment.