2

I'm lazy loading tabs (using the built in bottom tab navigator) on my React Native app that uses React Navigation, to make my app launch faster. But I also have a frequently used tab that loads a bit slow due to the nature of its contents, and I want to explicitly load that tab in background after my home screen is rendered properly. In other words, I want to "force load my second tab after home screen finishes rendering/loading data properly" as the user will probably be looking at the static screen for a second or two anyway, so that when they tap the second tab, it will be already loaded when the home screen was static. This way I can achieve both a fast app start time to a fully functional home screen, and prevent initial load lag of my second screen for a smoother user experience.

How do I achieve that? (I know I can specify lazy loading specific screens with the upcoming 6.x version, but that won't solve my problem)

Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
  • 1
    Seeking this "staggered loading" functionality too. My ugly hack right now is to turn off lazy loading and lean on setTimeouts – user2312371 May 20 '21 at 15:53
  • 1
    @user2312371 I wish there was some kind of "optimistic load", neither lazy nor eager load, but "load only when frame rate settles down after tab bar mounts" kind of thing. – Can Poyrazoğlu May 20 '21 at 19:07

0 Answers0