diff --git a/app/components/routes/login.js b/app/components/routes/login.js index f39cf98..d1ba846 100644 --- a/app/components/routes/login.js +++ b/app/components/routes/login.js @@ -1,6 +1,4 @@ import React from 'react-native'; -import Immutable from 'immutable'; - import GlobalStyles from '../../settings/styles'; const { @@ -47,13 +45,20 @@ const styles = StyleSheet.create({ export default class Login extends React.Component { constructor() { super(); - this.state = Immutable.Map({ - password: '', - }); + this.state = { + + }; + this.validate = this.validate.bind(this); + this.updateState = this.updateState.bind(this); + } + + updateState(key, value) { + let state = this.state; + state[key] = value; + this.setState(state); } validate() { - } componentWillMount() { @@ -69,8 +74,8 @@ export default class Login extends React.Component { this.state.set('password', password)} - value={this.state.get('password')} + onChangeText={(password) => this.updateState('password', password)} + value={this.state.password} onSubmitEditing={this.validate} placeholder="Password" /> diff --git a/package.json b/package.json index f4ca8a9..cd8ea1f 100644 --- a/package.json +++ b/package.json @@ -8,18 +8,20 @@ "test": "npm run lint" }, "dependencies": { + "circleci": "=0.3.0", "immutable": "=3.7.6", "react-native": "=0.19.0", + "react-native-side-menu": "=0.18.0", "react-native-vector-icons": "=1.0.4", "underscore": "=1.8.3" }, "devDependencies": { - "babel-eslint": "=4.1.6", - "eslint": "=1.10.3", - "eslint-config": "git://github.com/oleous/eslint-config.git", - "eslint-plugin-react": "=3.14.0", - "eslint-plugin-react-native": "=0.5.0", - "react": "=0.14.6", - "react-addons-test-utils": "=0.14.6" - } + "babel-eslint": "=4.1.6", + "eslint": "=1.10.3", + "eslint-config": "git://github.com/oleous/eslint-config.git", + "eslint-plugin-react": "=3.14.0", + "eslint-plugin-react-native": "=0.5.0", + "react": "=0.14.6", + "react-addons-test-utils": "=0.14.6" + } }