If I have a navigator with two views:
_renderScene(route, navigator) {
if (route.id === 1) {
return <PageOne navigator={navigator}
setIndex={this.setIndex} />
} else if (route.id === 2) {
return <PageTwo navigator={navigator}
index={this.state.index} />
}
}
And when I'm on PageOne, I want to begin to preload PageTwo. Is there an easy way to handle this asynchronous loading so the page is ready when the user clicks to navigate?
Imagine page one is a scrollview, and page two is a list of images, so you want to start loading the list of images for view2 as soon as you scroll to a tab. That way when you select the tab it will begin loading the associated view.
The real confusion for me is how to begin loading a page in the background?