MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / fetchTodos

Function fetchTodos

examples/loco_example/frontend/src/App.jsx:46–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 const queryClient = useQueryClient();
45
46 const fetchTodos = async () => {
47 const { data } = await axios.get(`api/notes`)
48 return data;
49 }
50
51 const { isLoading, isError, data = [] } = useQuery(["todos"], fetchTodos); // a hook provided by react-query, it takes a key(name) and function that returns a promise
52

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected