searchParams
PRISM threads ?q=... from the URL into props.searchParams. The page filters a list and renders fresh HTML on every submit — no client JS, no loader needed for this shape.
Output
24 matches
- apple
- apricot
- avocado
- banana
- blackberry
- blueberry
- cherry
- coconut
- cranberry
- fig
- grape
- guava
- kiwi
- lemon
- mango
- orange
- papaya
- peach
- pear
- pineapple
- plum
- raspberry
- strawberry
- watermelon
Source
// PRISM threads ?q=… into props.searchParams.
export default function Page(props: {
searchParams?: { q?: string }
}) {
const q = props.searchParams?.q ?? "";
const items = q ? FRUITS.filter(f => f.toLowerCase().includes(q.toLowerCase())) : FRUITS;
return (
);
}