MCPcopy Create free account
hub / github.com/cosdensolutions/code / Demo

Function Demo

videos/long/learn-react-hooks-useDeferredValue/index.tsx:9–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import SlowList from './SlowList';
8
9const 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
26export default Demo;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected