I have a simple React Native app with 4 tabs like so (simplified for sake of brevity):
<Tab.Navigator>
<Tab.Screen name="Feed" component={WebViewNavigator} initialParams={{...}} />
<Tab.Screen name="Schedule" component={WebViewNavigator} initialParams={{...}} />
<Tab.Screen name="About" component={WebViewNavigator} initialParams={{...}} />
<Tab.Screen name="Help" component={WebViewNavigator} initialParams={{...}} />
</Tab.Navigator>
The WebViewNavigator component is a stack view using a React Native Webview to load some corresponding web content, however, it does not load until the corresponding tab is activated:
<Stack.Navigator>
<Stack.Screen name="Viewer" component={WebViewScreen} />
</Stack.Navigator>
Is there a way to have the app load all tabs/webviews on load so there isn't this webview loading delay on each tab?
I am using the lazy prop of createBottomTabNavigator which doesn't seem to have any effect:
<Tab.Navigator lazy={false}> ...
Triggering a log in the WebView constructor reveals that the stack navigator is instantiated, but the webview is not loaded.