Workflow: Product Search & Filter

Search for products, apply filters, and refine results to find the perfect item.

1
Search
2
Apply Filters
3
View Results
1

Step 1: Search Products

Enter keywords to search for products

Search implementationtsx
1import { useProducts } from '@fanbace/sdk';
2
3function ProductSearch() {
4 const [query, setQuery] = useState('');
5 const { products, search, loading } = useProducts();
6
7 const handleSearch = async () => {
8 const results = await search(query);
9 // Display results
10 };
11
12 return (
13 <Input
14 value={query}
15 onChange={(e) => setQuery(e.target.value)}
16 onKeyPress={(e) => e.key === 'Enter' && handleSearch()}
17 />
18 );
19}