mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove cycle between ReactFiberHooks and ReactInternalTypes (#20242)
Co-authored-by: Paul Doyle <pauldoyle22@gmail.com>
This commit is contained in:
@@ -13,7 +13,7 @@ import type {
|
||||
MutableSourceSubscribeFn,
|
||||
ReactContext,
|
||||
} from 'shared/ReactTypes';
|
||||
import type {Fiber, Dispatcher} from './ReactInternalTypes';
|
||||
import type {Fiber, Dispatcher, HookType} from './ReactInternalTypes';
|
||||
import type {Lanes, Lane} from './ReactFiberLane';
|
||||
import type {HookFlags} from './ReactHookEffectTags';
|
||||
import type {ReactPriorityLevel} from './ReactInternalTypes';
|
||||
@@ -118,22 +118,6 @@ type UpdateQueue<S, A> = {|
|
||||
lastRenderedState: S | null,
|
||||
|};
|
||||
|
||||
export type HookType =
|
||||
| 'useState'
|
||||
| 'useReducer'
|
||||
| 'useContext'
|
||||
| 'useRef'
|
||||
| 'useEffect'
|
||||
| 'useLayoutEffect'
|
||||
| 'useCallback'
|
||||
| 'useMemo'
|
||||
| 'useImperativeHandle'
|
||||
| 'useDebugValue'
|
||||
| 'useDeferredValue'
|
||||
| 'useTransition'
|
||||
| 'useMutableSource'
|
||||
| 'useOpaqueIdentifier';
|
||||
|
||||
let didWarnAboutMismatchedHooksForComponent;
|
||||
let didWarnAboutUseOpaqueIdentifier;
|
||||
if (__DEV__) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import type {
|
||||
MutableSourceSubscribeFn,
|
||||
ReactContext,
|
||||
} from 'shared/ReactTypes';
|
||||
import type {Fiber, Dispatcher} from './ReactInternalTypes';
|
||||
import type {Fiber, Dispatcher, HookType} from './ReactInternalTypes';
|
||||
import type {Lanes, Lane} from './ReactFiberLane';
|
||||
import type {HookFlags} from './ReactHookEffectTags';
|
||||
import type {ReactPriorityLevel} from './ReactInternalTypes';
|
||||
@@ -109,22 +109,6 @@ type UpdateQueue<S, A> = {|
|
||||
lastRenderedState: S | null,
|
||||
|};
|
||||
|
||||
export type HookType =
|
||||
| 'useState'
|
||||
| 'useReducer'
|
||||
| 'useContext'
|
||||
| 'useRef'
|
||||
| 'useEffect'
|
||||
| 'useLayoutEffect'
|
||||
| 'useCallback'
|
||||
| 'useMemo'
|
||||
| 'useImperativeHandle'
|
||||
| 'useDebugValue'
|
||||
| 'useDeferredValue'
|
||||
| 'useTransition'
|
||||
| 'useMutableSource'
|
||||
| 'useOpaqueIdentifier';
|
||||
|
||||
let didWarnAboutMismatchedHooksForComponent;
|
||||
let didWarnAboutUseOpaqueIdentifier;
|
||||
if (__DEV__) {
|
||||
|
||||
+17
-1
@@ -21,12 +21,28 @@ import type {WorkTag} from './ReactWorkTags';
|
||||
import type {TypeOfMode} from './ReactTypeOfMode';
|
||||
import type {Flags} from './ReactFiberFlags';
|
||||
import type {Lane, LanePriority, Lanes, LaneMap} from './ReactFiberLane';
|
||||
import type {HookType} from './ReactFiberHooks.old';
|
||||
import type {RootTag} from './ReactRootTags';
|
||||
import type {TimeoutHandle, NoTimeout} from './ReactFiberHostConfig';
|
||||
import type {Wakeable} from 'shared/ReactTypes';
|
||||
import type {Interaction} from 'scheduler/src/Tracing';
|
||||
|
||||
// Unwind Circular: moved from ReactFiberHooks.old
|
||||
export type HookType =
|
||||
| 'useState'
|
||||
| 'useReducer'
|
||||
| 'useContext'
|
||||
| 'useRef'
|
||||
| 'useEffect'
|
||||
| 'useLayoutEffect'
|
||||
| 'useCallback'
|
||||
| 'useMemo'
|
||||
| 'useImperativeHandle'
|
||||
| 'useDebugValue'
|
||||
| 'useDeferredValue'
|
||||
| 'useTransition'
|
||||
| 'useMutableSource'
|
||||
| 'useOpaqueIdentifier';
|
||||
|
||||
export type ReactPriorityLevel = 99 | 98 | 97 | 96 | 95 | 90;
|
||||
|
||||
export type ContextDependency<T> = {
|
||||
|
||||
Reference in New Issue
Block a user