react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

All screens load and render on app start

Open fadinasr opened this issue 6 years ago • 4 comments

🐛 Bug Report

I'm using bottom tabs in my Main root after the user logs in. All pages are rendering after the app starts. I tried using tabsAttachMode: 'onSwitchToTab' but nothing is changed.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Add tabs attached mode to qual to onSwitchToTab inside the bottomTabs of the main root.
  2. Rebuild the application
  3. Check the log to see which screens loads on startup

Expected behavior

Each stack should render after pressing on its' icon. Would be perfect if each child can render after jumping into it.

Actual Behavior

All the screens are being rendered on app load.

Your Environment

  • React Native Navigation version: 7.4.0
  • React Native version: 0.63.3
  • Platform(s) (iOS, Android, or both?): both
  • Device info (Simulator/Device? OS version? Debug/Release?): debug version on both simulator and device

Reproducible Demo

https://gist.github.com/fadinasr/f582af0b82504d0929e41deea4fb2290

fadinasr avatar Nov 21 '20 18:11 fadinasr

Tried to add tabsAttachMode: 'onSwitchToTab' inside Navigation.setDefaultOptions and also didn't work.

fadinasr avatar Nov 21 '20 18:11 fadinasr

There is no root.bottomTabs.tabsAttachMode option.

danilobuerger avatar Nov 23 '20 09:11 danilobuerger

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the wix-react-native-navigation tag or on Discord.

github-actions[bot] avatar Nov 23 '20 09:11 github-actions[bot]

Anyone got this working?

zainspresso avatar Apr 17 '22 23:04 zainspresso