Skip to content

Commit

Permalink
Refactored AsyncCreatable.js
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri-sakharov committed Dec 22, 2017
1 parent 4fa40cb commit d205e64
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/AsyncCreatable.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
import Select from './Select';
import React from 'react';

import Async from './Async';
import Creatable from './Creatable';
import Select from './Select';

class AsyncCreatableSelect extends React.Component {

Expand Down Expand Up @@ -32,13 +33,9 @@ class AsyncCreatableSelect extends React.Component {
</Async>
);
}
};
}

function defaultChildren (props) {
return (
<Select {...props} />
);
};
const defaultChildren = props => <Select {...props} />;

AsyncCreatableSelect.propTypes = {
children: PropTypes.func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element
Expand Down

0 comments on commit d205e64

Please sign in to comment.