()
| 519 | } |
| 520 | |
| 521 | function useId(): string { |
| 522 | const hook = nextHook(); |
| 523 | const id = hook !== null ? hook.memoizedState : ''; |
| 524 | hookLog.push({ |
| 525 | displayName: null, |
| 526 | primitive: 'Id', |
| 527 | stackError: new Error(), |
| 528 | value: id, |
| 529 | debugInfo: null, |
| 530 | dispatcherHookName: 'Id', |
| 531 | }); |
| 532 | return id; |
| 533 | } |
| 534 | |
| 535 | // useMemoCache is an implementation detail of Forget's memoization |
| 536 | // it should not be called directly in user-generated code |