Skip to main content
Version: 3.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 }))