T
TanStack3y ago
quickest-silver

how to implement setQueryData ??

Hello everyone Currently, I'm studying react-query and testing different features. Currently I'm testing queryClient.setQueryData, and I'm getting a I don't see that query in Devtools... Am I doing something wrong?
const Dummy= () => {
const [nickname, setNickname] = useState(getNickname)
const queryClient = new QueryClient();
useEffect(() => {
queryClient.setQueryData(['nickname'], nickname);
}, [nickname]);
return (
<div>Hello</Hello
)
}
const Dummy= () => {
const [nickname, setNickname] = useState(getNickname)
const queryClient = new QueryClient();
useEffect(() => {
queryClient.setQueryData(['nickname'], nickname);
}, [nickname]);
return (
<div>Hello</Hello
)
}
No description
No description
1 Reply
frail-apricot
frail-apricot3y ago
React Query FAQs
Answering the most frequently asked React Query questions

Did you find this page helpful?