在打开ReactNative应用程序时触发事件

时间:2015-09-30 20:56:47

标签: reactjs react-native

有人知道每当打开反应性应用程序时如何触发事件?例如。每当用户再次打开应用程序时刷新数据。

2 个答案:

答案 0 :(得分:1)

答案 1 :(得分:0)

转到导航开始的那个文件。

    import React, { Component } from 'react';
    import { Root } from './config/router';

    class Index extends Component {
        componentWillMount(){
             //your event function code
}
        render() {
            return <Root />;
        }
    }

export default Index;

Here Root contains all screens where navigation starts.
相关问题