This commit is contained in:
a 2024-05-31 16:49:47 +02:00
parent 44bfc55a4b
commit a3bd0dfe0a

13
App.js
View File

@ -81,11 +81,16 @@ function App() {
const ReqButton = () => {
const mutation = useMutation({ mutationKey: ["addTodo"] });
const query = useQuery({ queryKey: ["todos"], queryFn: () => makeCall("a") });
return (
<Button
title={"Request"}
onPress={() => mutation.mutate({page: "a" })}
/>
<>
<Button
title={"Request"}
onPress={() => mutation.mutate({ page: "a" })}
/>
<Text>{query.data && query.data.toString() || ''}</Text>
</>
);
};