From bc9c1fbf616782a49dbe947725220d2f9077ced1 Mon Sep 17 00:00:00 2001 From: kalijonn <43421621+kalijonn@users.noreply.github.com> Date: Mon, 11 Dec 2023 20:06:07 +0530 Subject: [PATCH] docs: update to v5 syntax --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dc9cf97..c004b82 100644 --- a/README.md +++ b/README.md @@ -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(() => ({