Created
February 21, 2017 18:36
-
-
Save brunodasilvalenga/bd7d7efb4f2f63b7aeaaad1243f141ce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import { | |
Container, | |
Header, | |
Title, | |
Content, | |
Text, | |
Button, | |
Icon, | |
Left, | |
Right, | |
Body, | |
List, | |
ListItem | |
} from 'native-base' | |
import NavBar from '../components/NavBar' | |
export default class HomeScreen extends Component { | |
constructor(props) { | |
super(props) | |
console.log('home', this.props) | |
} | |
_setParentState(args){ | |
this.props.setParentState(args) | |
} | |
componentWillMount () { | |
this._setParentState({'drawerDisabled': false}) | |
} | |
componentWillReceiveProps(nextProps) { | |
console.log('home - next props', nextProps) | |
} | |
render() { | |
return ( | |
<Container> | |
<NavBar route={this.props.route} navigator={this.props.navigator} emitter={this.props.emitter} /> | |
<Content> | |
<Button onPress={() => this.props.navigator.push({id: 'client'})}> | |
<Text>Go to Client</Text> | |
</Button> | |
<Button onPress={() => this._setParentState({'drawerDisabled': false})}> | |
<Text>Active Drawer</Text> | |
</Button> | |
</Content> | |
</Container> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment