From 66eb15d6bf573bedbb2837283dfbc4409cfac36a Mon Sep 17 00:00:00 2001 From: Nick Uraltsev Date: Sat, 11 Nov 2017 16:08:06 -0800 Subject: [PATCH] Add support for React 16 --- package.json | 6 ++++-- src/OverflowDetector.jsx | 3 ++- src/ResizeDetector.jsx | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 70c40e2..38fb0f1 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,9 @@ }, "license": "MIT", "main": "lib/index.js", + "dependencies": { + "prop-types": "15.6.0" + }, "devDependencies": { "babel-cli": "^6.24.0", "babel-core": "^6.24.0", @@ -34,8 +37,7 @@ "rimraf": "^2.6.1" }, "peerDependencies": { - "react": "^15.0.0", - "react-dom": "^15.0.0" + "react": ">=15" }, "prettier": { "useTabs": false, diff --git a/src/OverflowDetector.jsx b/src/OverflowDetector.jsx index c18ed33..46f5820 100644 --- a/src/OverflowDetector.jsx +++ b/src/OverflowDetector.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import ResizeDetector from './ResizeDetector'; export default class OverflowDetector extends Component { diff --git a/src/ResizeDetector.jsx b/src/ResizeDetector.jsx index bd664f0..f79c090 100644 --- a/src/ResizeDetector.jsx +++ b/src/ResizeDetector.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; const OBJECT_STYLE = { display: 'block',