I am using nuqs to handle query params from client component. It uses adapter to handle searchparams. But I am taking search params in server component which is a parent componetnt.
const Page = async (props: PageProps<any>) => {
const searchParams = await props.searchParams;
console.log("SEARCH PARAMS", searchParams);
I am using nuqs like this:
const [query, setQuery] = useQueryState("query");
<div className="relative mb-4">
<Input
value={query ?? ""}
onChange={(e) => setQuery(e.target.value)}
type="text"
placeholder="Keyword"
className="pl-10 pr-4 py-2 w-full"
/>
<Search className="absolute left-3 top-2.5 h-5 w-5 text-gray-400" />
</div>
But when i type and the query parameter changes I dont get that in page component. I have to refresh. But i can see the query params in url though.