Skip to content

Commit 48348bc

Browse files
authored
Merge pull request JedWatson#1820 from jochenberger/use-es6-1
convert AsyncCreatable to ES6 class
2 parents d85a2c3 + f67f514 commit 48348bc

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/AsyncCreatable.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import createClass from 'create-react-class';
32
import Select from './Select';
43

54
function reduce(obj, props = {}){
@@ -11,12 +10,11 @@ function reduce(obj, props = {}){
1110
}, props);
1211
}
1312

14-
const AsyncCreatable = createClass({
15-
displayName: 'AsyncCreatableSelect',
13+
class AsyncCreatableSelect extends React.Component {
1614

1715
focus () {
1816
this.select.focus();
19-
},
17+
}
2018

2119
render () {
2220
return (
@@ -42,6 +40,7 @@ const AsyncCreatable = createClass({
4240
</Select.Async>
4341
);
4442
}
45-
});
43+
};
44+
45+
module.exports = AsyncCreatableSelect;
4646

47-
module.exports = AsyncCreatable;

0 commit comments

Comments
 (0)