Skip to content

Commit

Permalink
Merge pull request #14 from onuite/fix-depracation-warnings
Browse files Browse the repository at this point in the history
Fix deprecation warnings
  • Loading branch information
plougsgaard committed May 6, 2017
2 parents 731d9cf + 4dcfd63 commit 38f4238
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ This simulates a light switch that takes `5000ms` to switch between `on` and `!o

```javascript
import ReactTimeout from 'react-timeout'
import createReactClass from 'create-react-class';

var Example = React.createClass({
var Example = createReactClass({
toggleOn: function () {
this.setState({ on: !this.state.on })
},
Expand Down Expand Up @@ -100,7 +101,7 @@ class Example extends Component { .. }

```javascript
@ReactTimeout
var Example = React.createClass({ .. })
var Example = createReactClass({ .. })
```

# Something similar
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"test": "mocha --compilers js:babel-core/register --require ./test/helper.js 'test/**/*.@(js|jsx)'"
},
"dependencies": {
"create-react-class": "^15.5.2",
"object-assign": "^4.0.1"
},
"devDependencies": {
Expand All @@ -39,7 +40,6 @@
"jsdom": "^10.1.0",
"mocha": "^3.2.0",
"react": "^15.4.2",
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2"
}
}
3 changes: 2 additions & 1 deletion src/reactTimeout.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var createReactClass = require('create-react-class')
var objectAssign = require('object-assign')

var createReactTimeout = function (React) {
Expand Down Expand Up @@ -52,7 +53,7 @@ var createReactTimeout = function (React) {
}

var ReactTimeout = function (SourceComponent) {
return React.createClass({
return createReactClass({
displayName: 'ReactTimeout',

setTimeout: _setTimeout,
Expand Down
2 changes: 1 addition & 1 deletion test/functions.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react'
import { renderIntoDocument, scryRenderedDOMComponentsWithClass } from 'react-addons-test-utils'
import { renderIntoDocument, scryRenderedDOMComponentsWithClass } from 'react-dom/test-utils'
import { expect } from 'chai'

import ReactTimeout from '..'
Expand Down
2 changes: 1 addition & 1 deletion test/timing.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react'
import { render, unmountComponentAtNode } from 'react-dom'
import { Simulate, renderIntoDocument, scryRenderedDOMComponentsWithClass } from 'react-addons-test-utils'
import { Simulate, renderIntoDocument, scryRenderedDOMComponentsWithClass } from 'react-dom/test-utils'
import { expect } from 'chai'

import ReactTimeout from '..'
Expand Down

0 comments on commit 38f4238

Please sign in to comment.