Skip to content

Commit

Permalink
Simplify imports in react reconciler (#13718)
Browse files Browse the repository at this point in the history
* Simplify imports in ReactChildFiber
* Import type first in ReactCurrentFiber
* Simplify imports in ReactFiberBeginWork
* Simplify imports in ReactFiberScheduler
* Simplify import in ReactFiberTreeReflection
* Simplify import in ReactFiberUnwindWork
* Remove repeated import
* Fix imports from ReactFiberExpirationTime
* Master imports in ReactFiberBeginWork
  • Loading branch information
mmarkelov authored and nhunzaker committed Nov 1, 2018
1 parent cdbfa6b commit d5d10d1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactChildFiber.js
Expand Up @@ -9,8 +9,8 @@

import type {ReactElement} from 'shared/ReactElementType';
import type {ReactPortal} from 'shared/ReactTypes';
import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {ExpirationTime} from 'react-reconciler/src/ReactFiberExpirationTime';
import type {Fiber} from './ReactFiber';
import type {ExpirationTime} from './ReactFiberExpirationTime';

import getComponentName from 'shared/getComponentName';
import {Placement, Deletion} from 'shared/ReactSideEffectTags';
Expand Down
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactCurrentFiber.js
Expand Up @@ -7,6 +7,8 @@
* @flow
*/

import type {Fiber} from './ReactFiber';

import ReactSharedInternals from 'shared/ReactSharedInternals';
import {
IndeterminateComponent,
Expand All @@ -21,8 +23,6 @@ import getComponentName from 'shared/getComponentName';

const ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;

import type {Fiber} from './ReactFiber';

type LifeCyclePhase = 'render' | 'getChildContext';

function describeFiber(fiber: Fiber): string {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberBeginWork.js
Expand Up @@ -8,7 +8,7 @@
*/

import type {ReactProviderType, ReactContext} from 'shared/ReactTypes';
import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from './ReactFiber';
import type {FiberRoot} from './ReactFiberRoot';
import type {ExpirationTime} from './ReactFiberExpirationTime';
import type {SuspenseState} from './ReactFiberSuspenseComponent';
Expand Down
3 changes: 3 additions & 0 deletions packages/react-reconciler/src/ReactFiberScheduler.js
Expand Up @@ -78,6 +78,9 @@ import {
noTimeout,
prepareForCommit,
resetAfterCommit,
scheduleTimeout,
cancelTimeout,
noTimeout,
} from './ReactFiberHostConfig';
import {
markPendingPriorityLevel,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberTreeReflection.js
Expand Up @@ -7,7 +7,7 @@
* @flow
*/

import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from './ReactFiber';

import invariant from 'shared/invariant';
import warningWithoutStack from 'shared/warningWithoutStack';
Expand Down
3 changes: 2 additions & 1 deletion packages/react-reconciler/src/ReactFiberUnwindWork.js
Expand Up @@ -61,11 +61,12 @@ import {
isAlreadyFailedLegacyErrorBoundary,
retrySuspendedRoot,
} from './ReactFiberScheduler';
import {NoWork, Sync} from './ReactFiberExpirationTime';

import invariant from 'shared/invariant';
import maxSigned31BitInt from './maxSigned31BitInt';
import {
NoWork,
Sync,
expirationTimeToMs,
LOW_PRIORITY_EXPIRATION,
} from './ReactFiberExpirationTime';
Expand Down

0 comments on commit d5d10d1

Please sign in to comment.