Skip to content

Commit

Permalink
explicitly importing react types to avoid deprecation warnings (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreardon committed Nov 20, 2017
1 parent bc2f421 commit 97c05dd
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/view/drag-drop-context/drag-drop-context.jsx
@@ -1,5 +1,5 @@
// @flow
import * as React from 'react';
import React, { type Node } from 'react';
import PropTypes from 'prop-types';
import createStore from '../../state/create-store';
import fireHooks from '../../state/fire-hooks';
Expand All @@ -12,7 +12,7 @@ import { storeKey } from '../context-keys';

type Props = {|
...Hooks,
children: ?React.Node,
children: ?Node,
|}

type Context = {
Expand Down
@@ -1,5 +1,5 @@
// @flow
import * as React from 'react';
import type { Node } from 'react';
import {
publishDraggableDimension,
} from '../../state/action-creators';
Expand All @@ -22,7 +22,7 @@ export type OwnProps = {|
droppableId: DroppableId,
type: TypeId,
targetRef: ?HTMLElement,
children: React.Node,
children: Node,
|}

export type Props = {|
Expand Down
6 changes: 3 additions & 3 deletions src/view/draggable/draggable-types.js
@@ -1,5 +1,5 @@
// @flow
import * as React from 'react';
import type { Node } from 'react';
import type {
DraggableId,
DraggableDimension,
Expand Down Expand Up @@ -99,7 +99,7 @@ export type Provided = {|
innerRef: (?HTMLElement) => void,
draggableStyle: ?DraggableStyle,
dragHandleProps: ?DragHandleProvided,
placeholder: ?React.Node,
placeholder: ?Node,
|}

export type StateSnapshot = {|
Expand Down Expand Up @@ -133,7 +133,7 @@ export type MapProps = {|

export type OwnProps = {|
draggableId: DraggableId,
children: (Provided, StateSnapshot) => ?React.Node,
children: (Provided, StateSnapshot) => ?Node,
type: TypeId,
isDragDisabled: boolean,
|}
Expand Down
@@ -1,5 +1,5 @@
// @flow
import * as React from 'react';
import type { Node } from 'react';
import {
publishDroppableDimension,
updateDroppableDimensionIsEnabled,
Expand Down Expand Up @@ -28,7 +28,7 @@ export type OwnProps = {|
type: TypeId,
targetRef: ?HTMLElement,
ignoreContainerClipping: boolean,
children: React.Node,
children: Node,
|}

export type Props = {|
Expand Down
6 changes: 3 additions & 3 deletions src/view/droppable/droppable-types.js
@@ -1,5 +1,5 @@
// @flow
import * as React from 'react';
import type { Node } from 'react';
import type {
DroppableId,
TypeId,
Expand All @@ -13,7 +13,7 @@ export type Placeholder = {|

export type Provided = {|
innerRef: (?HTMLElement) => void,
placeholder: ?React.Node,
placeholder: ?Node,
|}

export type StateSnapshot = {|
Expand All @@ -29,7 +29,7 @@ export type MapProps = {|
|}

export type OwnProps = {|
children: (Provided, StateSnapshot) => ?React.Node,
children: (Provided, StateSnapshot) => ?Node,
droppableId: DroppableId,
type: TypeId,
isDropDisabled: boolean,
Expand Down
4 changes: 2 additions & 2 deletions src/view/moveable/moveable-types.js
@@ -1,5 +1,5 @@
// @flow
import * as React from 'react';
import type { Node } from 'react';
import type { Position } from '../../types';

export type Speed = 'INSTANT' | 'STANDARD' | 'FAST';
Expand All @@ -12,7 +12,7 @@ export type Props = {|
speed: Speed,
destination: Position,
onMoveEnd: () => void,
children: (Style) => React.Node,
children: (Style) => Node,
|}

export type DefaultProps = {|
Expand Down

0 comments on commit 97c05dd

Please sign in to comment.