Skip to main content
Version: 5.x.x

Fetching

For fetching data use the useFetch hook that automates request handling. There are tons of options to adjust this hook so check out the documentation.


Examples

import { getUsers, getUser } from "server/user";

...

const { data, error, loading } = useFetch(getUsers)

import { getUsers, getUser } from "server/user";

...

const { data, error, loading } = useFetch(getUser.setParams({ userId: 1 }))