09 2017 档案
react native中刷新页面
摘要:在react native中刷新页面就是改变页面的数据源,如果页面的数据源是state或者是store那么当数据源改变了.页面就会自动刷新的.所以刷新页面的两种方式 1:用redux来做数据源,无论在哪个页面只要改变了某一个页面的数据源,那么那个页面都会刷新 2:用回调的方法来刷新前一个页面,在用r
阅读全文
React native的static propTypes
摘要:这个静态变量的重要性: 定义一个组件的时候为了方便别人使用需要在顶部声明这个 static propTypes={}.这里声明好外部引用的时候需要传的参数 例子:
阅读全文
修改react native 的工程名
摘要:修改工程名,需要以下几个步骤: 修改android/app/build.gradle里的applicationId,为新包名,譬如:com.xxx.yyy.myProject 修改android/app/src/main/AndroidManifest.xml里的package,为新包名,譬如:co
阅读全文
react native的flatList
摘要:1:关于这个组件的上拉加载:
阅读全文
react native 调去电话功能
摘要:let url = 'tel: ' + this.state.ConsigneePhone;Linking.canOpenURL(url).then(supported => { if (!supported) { console.log('Can\'t handle url: ' + url);
阅读全文
react native获取键盘高度
摘要:componentWillUnmount() { this.keyboardDidShowListener.remove(); this.keyboardDidHideListener.remove();}componentWillMount() { this.keyboardDidShowList
阅读全文
浙公网安备 33010602011771号