(initialValue: T)
| 323 | } |
| 324 | |
| 325 | function useRef<T>(initialValue: T): {current: T} { |
| 326 | const hook = nextHook(); |
| 327 | const ref = hook !== null ? hook.memoizedState : {current: initialValue}; |
| 328 | hookLog.push({ |
| 329 | displayName: null, |
| 330 | primitive: 'Ref', |
| 331 | stackError: new Error(), |
| 332 | value: ref.current, |
| 333 | debugInfo: null, |
| 334 | dispatcherHookName: 'Ref', |
| 335 | }); |
| 336 | return ref; |
| 337 | } |
| 338 | |
| 339 | function useCacheRefresh(): () => void { |
| 340 | const hook = nextHook(); |