Skip to content

Commit

Permalink
Update spa.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanflorence authored Nov 23, 2024
1 parent a40b3c0 commit 3ff9bde
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/how-to/spa.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3ff9bde

Please sign in to comment.