Function
useCallback
(callback: T, inputs: Array<mixed> | void | null)
Source from the content-addressed store, hash-verified
| 430 | } |
| 431 | |
| 432 | function useCallback<T>(callback: T, inputs: Array<mixed> | void | null): T { |
| 433 | const hook = nextHook(); |
| 434 | hookLog.push({ |
| 435 | displayName: null, |
| 436 | primitive: 'Callback', |
| 437 | stackError: new Error(), |
| 438 | value: hook !== null ? hook.memoizedState[0] : callback, |
| 439 | debugInfo: null, |
| 440 | dispatcherHookName: 'Callback', |
| 441 | }); |
| 442 | return callback; |
| 443 | } |
| 444 | |
| 445 | function useMemo<T>( |
| 446 | nextCreate: () => T, |