import { useState } from 'react' import { FzfHighlight, useFzf } from 'react-fzf' import { posts } from '../utils/data' import { Example } from '../utils/Example' export function WithObjects() { const [query, setQuery] = useState('') const { getFzfHighlightProps, results } = useFzf({ items: posts, itemToString(item) { return item.title }, query, }) return ( query: setQuery(event.target.value)} /> } > ) }