Next.js Discord

Discord Forum

Caching a fully client dynamic page

Unanswered
Whiteleg shrimp posted this in #help-forum
Open in Discord
Avatar
Whiteleg shrimpOP
Is there a way to get a x-vercel-cache: hit for a fully client side page?
"use client"

import { useParams } from "next/navigation"

export const dynamic = "force-static"

export default function Page() {
  const params = useParams<{ someid: string }>()
  return <div>Hello {params.someid}</div>
}

I have tried some things but no success.
The idea is to fetch data using react query, so technically is the same HTML for all before the data fetching

0 Replies