lll
This commit is contained in:
parent
44bfc55a4b
commit
a3bd0dfe0a
13
App.js
13
App.js
@ -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>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user