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

Function Stateful

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

Source from the content-addressed store, hash-verified

100 }
101
102 function Stateful() {
103 const [state, setState] = useState(false);
104 set = setState;
105 return (
106 <div>
107 <Child />
108 {state && <Child />}
109 </div>
110 );
111 }
112
113 function Comp() {
114 const id = useId();

Callers

nothing calls this directly

Calls 3

useStateFunction · 0.90
useReducerFunction · 0.90
useIdFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…