Dynamic server usage: Page couldn't be rendered statically because it used `searchParams.q`
Answered
Fire ant posted this in #help-forum
Fire antOP
Using 14.0.4-canary.42, when building got that error Dynamic server usage: Page couldn't be rendered statically because it used
Any other method? Im using page.tsx and not client side.
searchParams.qAny other method? Im using page.tsx and not client side.
3 Replies
if its static it wont render again with a search param change. so no.
Fire antOP
it fixed with const dynamic = 'force-dynamic';
Answer
Fire antOP
need to place it above searchParams before i call searchParams