diff options
| author | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-10 19:25:19 +0000 |
|---|---|---|
| committer | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-10 19:25:19 +0000 |
| commit | d8ea9e952083e6d4d905a13729a9f8525abeb286 (patch) | |
| tree | d26a4c1a0df1b6529ed27dfbbd40c9751bbbc74d /app/components/AccountInput.js | |
| parent | ab936cc298a81dbf0ef13e53bd03cff7f2324d13 (diff) | |
| download | mullvadvpn-d8ea9e952083e6d4d905a13729a9f8525abeb286.tar.xz mullvadvpn-d8ea9e952083e6d4d905a13729a9f8525abeb286.zip | |
Improve docs coverage. Add external docs for React.Component and Redux.Store
Diffstat (limited to 'app/components/AccountInput.js')
| -rw-r--r-- | app/components/AccountInput.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/components/AccountInput.js b/app/components/AccountInput.js index 5869ae986c..eba498fb95 100644 --- a/app/components/AccountInput.js +++ b/app/components/AccountInput.js @@ -3,12 +3,24 @@ import { formatAccount } from '../lib/formatters'; export default class AccountInput extends Component { + /** + * Prop types + * @static + * + * @memberOf AccountInput + */ static propTypes = { value: PropTypes.string, onEnter: PropTypes.func, onChange: PropTypes.func } + /** + * Creates an instance of AccountInput. + * @param {object} props + * + * @memberOf AccountInput + */ constructor(props) { super(props); @@ -21,6 +33,9 @@ export default class AccountInput extends Component { }; } + /** + * @override + */ componentWillReceiveProps(nextProps) { const nextVal = this.sanitize(nextProps.value); if(nextVal !== this.state.value) { |
