MCPcopy
hub / github.com/preactjs/preact / Comp

Function Comp

hooks/test/browser/useId.test.jsx:23–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21
22 it('keeps the id consistent after an update', () => {
23 function Comp() {
24 const id = useId();
25 return <div id={id} />;
26 }
27
28 render(<Comp />, scratch);
29 const id = scratch.firstChild.getAttribute('id');

Callers

nothing calls this directly

Calls 1

useIdFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…