From 3ff9bdecfbb2b97965807ed02084ad91e270a58a Mon Sep 17 00:00:00 2001 From: Ryan Florence Date: Sat, 23 Nov 2024 16:07:04 -0700 Subject: [PATCH] Update spa.md --- docs/how-to/spa.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/how-to/spa.md b/docs/how-to/spa.md index 1636d3ff19..bc7678b5ed 100644 --- a/docs/how-to/spa.md +++ b/docs/how-to/spa.md @@ -30,10 +30,10 @@ With server rendering disabled, you can still use `clientLoader` and `clientActi ```tsx filename=some-route.tsx import { Route } from "./+types/some-route"; -export async function clientLoader( - _: Route.ClientLoaderArgs -) { - let data = await fetch("/some/api/stuff"); +export async function clientLoader({ + params +}: Route.ClientLoaderArgs) { + let data = await fetch(`/some/api/stuff/${params.id}`); return data; }