React-native-router-flux:是否有 OnEnter 方法?
React-native-router-flux: is there an OnEnter method?
我整个上午都在阅读 docs,但找不到简单的 OnEnter()
方法,例如 react-router
。我使用的是最新版本。
我需要在输入一些特定内容时获取一些资源Scene
。有什么想法吗?
您可以在场景组件中使用构造函数或 componentWillMount 函数。
constructor(props){
fetch(url)
then(doThings())
}
我整个上午都在阅读 docs,但找不到简单的 OnEnter()
方法,例如 react-router
。我使用的是最新版本。
我需要在输入一些特定内容时获取一些资源Scene
。有什么想法吗?
您可以在场景组件中使用构造函数或 componentWillMount 函数。
constructor(props){
fetch(url)
then(doThings())
}