Skip to content

Commit fbf25a7

Browse files
authored
Merge pull request #14 from brendanmh/master
Refactored imports to prevent React 15.5.4 warnings
2 parents 63dd0a9 + c2f254d commit fbf25a7

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

package.json

Lines changed: 2 additions & 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": {
@@ -46,6 +46,7 @@
4646
"karma-webpack": "~1.7.0",
4747
"mocha": "~2.4.5",
4848
"phantomjs-prebuilt": "~2.1.7",
49+
"prop-types": "~15.5.8",
4950
"react": "^15.0.1",
5051
"react-addons-test-utils": "^15.0.1",
5152
"react-dom": "^15.0.1",

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)