lazy load nested stack navigator
See original GitHub issueDescribe the bug In my app i have multiple stack navigators, when i try to use register on the stack it doesnt work, but when i do it on screens separately it works.
Code snippet
import { FTUEStack } from './FTUEStack';
const AppNavigator = createSwitchNavigator({
FTUE: {
screen: FTUEStack
}
)
changing it to (doesn’t work):
import { register } from 'react-native-bundle-splitter';
const AppNavigator = createSwitchNavigator({
FTUE: {
screen: register({
require: () => require('./FTUEStack'),
name: "FTUE"
})
}
)
i preload the component and then navigate, i have no errors but i dont have navigation.
Thank you for your help !
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Preload nested stack in react-navigation 5.x tab - Stack Overflow
I am using the lazy prop of createBottomTabNavigator which doesn't seem to have any effect: <Tab.Navigator lazy={false}> ... Triggering a log in ...
Read more >Nesting navigators - React Navigation
Stack navigators nested inside each screen of tab navigator - The tab bar is always visible. Usually pressing the tab again also pops...
Read more >BigBinary Books - Using Nested Navigators
A Stack Navigator provides a way for your app to transition between screens where each new screen is placed on top of a...
Read more >Angular Navigation: How Routing & Redirects Work in Angular ...
The simplest breakdown for what we have here is a path/component lookup. When our app loads, the router kicks things off by reading...
Read more >Nested Navigation - StackBlitz
Editor Preview Both. Sign in. Project. Search. Settings. Switch to Light Theme. Enter Zen Mode. Project. Download Project. Info. Nested Navigation. Lazy ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @kirillzyusko for the explanation ! I think moving to react navigation 5 will be a good option although we have a big project.
Hi @kirillzyusko
created a new sample app, this time i have an error “no routes in navigation state”. i agree that it is made for screens, but loading a whole stack can save a lot of time.
here is a link.
https://github.com/MaxToyberman/bundleSplitterExample