(index: number, kind: HookState["kind"])
| 359 | const mutableState = state as MutableInstanceState; |
| 360 | |
| 361 | function assertCanCreateHook(index: number, kind: HookState["kind"]): void { |
| 362 | if (mutableState.expectedHookCount !== null && index >= mutableState.expectedHookCount) { |
| 363 | throw new Error( |
| 364 | `Hook count mismatch at index ${index}: rendered more hooks than previous render while reading ${kind}`, |
| 365 | ); |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | function getHookIndex(): number { |
| 370 | const index = mutableState.hookIndex; |
no outgoing calls
no test coverage detected