()
| 7 | import SlowList from './SlowList'; |
| 8 | |
| 9 | const Demo = () => { |
| 10 | const [query, setQuery] = useState(''); |
| 11 | const deferredQuery = useDeferredValue(query); |
| 12 | |
| 13 | return ( |
| 14 | <div className='tutorial'> |
| 15 | <SlowList text={deferredQuery} /> |
| 16 | <input |
| 17 | type='text' |
| 18 | value={query} |
| 19 | onChange={(e) => setQuery(e.target.value)} |
| 20 | placeholder='Search...' |
| 21 | /> |
| 22 | </div> |
| 23 | ); |
| 24 | }; |
| 25 | |
| 26 | export default Demo; |
nothing calls this directly
no outgoing calls
no test coverage detected