Reactjs 当本机应用程序打开时触发事件
有人知道如何在本机应用程序打开时触发事件吗?每当用户再次打开应用程序时刷新数据。解决了这个问题Reactjs 当本机应用程序打开时触发事件,reactjs,react-native,Reactjs,React Native,有人知道如何在本机应用程序打开时触发事件吗?每当用户再次打开应用程序时刷新数据。解决了这个问题 我需要用这个 转到导航开始的文件 import React, { Component } from 'react'; import { Root } from './config/router'; class Index extends Component { componentWillMount(){ //your event fu
我需要用这个 转到导航开始的文件
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.
import React,{Component}来自'React';
从“./config/router”导入{Root};
类索引扩展组件{
组件willmount(){
//您的事件函数代码
}
render(){
返回;
}
}
出口违约指数;
这里Root包含导航开始的所有屏幕。
我想这一页已经改变了。你做了什么?