react native日常开发遇到的问题
react-native navigationOptions中不能获取this、state场景:在createStackNavigator路由过来的页面,navigationOptions的header中添加搜索框 如下图: static navigationOptions = { headerStyle: {backgroundColor: '#0086f1'}, headerTitle: ( <TextInput placeholder={'请输入搜索内容'} onChangeText={(text) => this.setState({'str': text})};constructor(props) { super(props); this.state = ({ str: '' })...





