Skip to main content
Version: 1.x.x

Fetching

For fetching data use the useFetch hook that automates command 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 }))