Open this example in the interactive library
Source code
"use client";
// components/RepeatedTagChips.tsx
import { Suspense } from "react";
import { useSearchParams } from "next/navigation";
function RepeatedTagChipsContent() {
const params = useSearchParams();
return (
<ul>
{params.getAll("tag").map((tag, i) => (
<li key={i}>{tag}</li>
))}
</ul>
);
}
export default function RepeatedTagChips() {
return (
<Suspense fallback={<span>Loading view…</span>}>
<RepeatedTagChipsContent />
</Suspense>
);
}
