Skip to content

Commit 95f6212

Browse files
committed
Refactored imports to prevent React 15.5.4 warnings
1 parent 63dd0a9 commit 95f6212

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-async-script-loader",
3-
"version": "0.2.2",
3+
"version": "0.2.3",
44
"description": "A decorator for script lazy loading on react component",
55
"main": "lib/index.js",
66
"scripts": {

src/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes as T } from 'react'
1+
import React, { Component } from 'react'
2+
import PropTypes from 'prop-types'
23
import hoistStatics from 'hoist-non-react-statics'
34
import { isDefined, newScript, series, noop } from './utils'
45

@@ -68,7 +69,7 @@ const removeFailedScript = () => {
6869
const scriptLoader = (...scripts) => (WrappedComponent) => {
6970
class ScriptLoader extends Component {
7071
static propTypes = {
71-
onScriptLoaded: T.func
72+
onScriptLoaded: PropTypes.func
7273
}
7374

7475
static defaultProps = {

test/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const ReactTestUtils = require('react-addons-test-utils')
1+
const ReactTestUtils = require('react-dom/test-utils')
22
const React = require('react')
33
const AsyncScriptLoader = require('../src').default
44

0 commit comments

Comments
 (0)