evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a React component that manages multiple product filter criteria using URL query parameters. The component should allow users to filter products by category, price range, availability status, and search query, with all filter states synchronized to the URL.
The component must manage the following filter criteria:
cat for categorymin for minimum pricemax for maximum pricestock for in-stock filterq for search queryThe component should support updating multiple filter criteria simultaneously in a single operation. For example, resetting all filters or applying a preset filter configuration should update all relevant URL parameters atomically.
When updating individual filters, unchanged filter values should remain in the URL. Setting a filter to undefined should leave that parameter unchanged.
Provide a "Clear All Filters" button that removes all filter parameters from the URL at once.
The component should display:
Provides URL state management functionality for React applications.
export function ProductFilter(): JSX.Element;