MCPcopy
hub / github.com/facebook/react / createHook

Function createHook

packages/react-server/src/ReactFizzHooks.js:171–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169}
170
171function createHook(): Hook {
172 if (numberOfReRenders > 0) {
173 throw new Error('Rendered more hooks than during the previous render');
174 }
175 return {
176 memoizedState: null,
177 queue: null,
178 next: null,
179 };
180}
181
182function createWorkInProgressHook(): Hook {
183 if (workInProgressHook === null) {

Callers 2

createWorkInProgressHookFunction · 0.70
initAsyncDebugInfoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected