Skip to content

Commit

Permalink
docs: update to v5 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
kalijonn committed Dec 11, 2023
1 parent 3fb9561 commit bc9c1fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ You can incrementally adopt `jotai-tanstack-query` in your app. It's not an all

```jsx
# existing useQueryHook
const { data, isLoading, isError } = useQuery('todos', () => fetch('/todos'));
const { data, isLoading, isError } = useQuery({
queryKey: ['todos'],
queryFn: fetchTodoList
});

# jotai-tanstack-query
const todosAtom = atomWithQuery(() => ({
Expand Down

0 comments on commit bc9c1fb

Please sign in to comment.