Skeleton: Define dependencies when fetching data
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
import { fetch_users } from "$lib/fetch";
|
||||
import type { PageLoad } from "../../$types";
|
||||
|
||||
export const load: PageLoad = async ({ fetch }) => {
|
||||
export const load: PageLoad = async ({ fetch, depends }) => {
|
||||
depends("data:users");
|
||||
|
||||
return {
|
||||
users: await fetch_users(fetch),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user