Hi all
In my app I “abuse” a tabnavigator component so that users cannot “swipe” back to the previous screen. At the moment that I added a 6th screen to the tab navigator, the app crashes at the moment I navigate to that screen (empty screen with just a button. screen goes blank/white when I navigate to it)
When I placed the screen outside the tabnavigator, the screen does appear, only now users are able to swipe back to the previous screen (only from the screen that is outside the tab navigator)
So I guess there is a practical limit of 5 screens per navigator. I don’t know if this was intended or if it is a bug, so if Thunkable staff is reading: if this is intended, please state in the documentation that the navigator is limited to 5 screens. If it is a bug: consider this post as a bug report
I really don’t want the users of my app to be able to swipe back and forth between screens, because that would really break the logic of the “flow” in the app. So I started looking for a workaround. I found something that seems to be working, but I don’t (yet) know if and how this will impact the code quality of the final app (I guess things will get really messy “under the hood” but we will see). Anyway, the workaround that seems to work is to nest multiple tab navigators. So at the highest level, I have one navigator, and below that two other navigators that contain the actual screens:
This seems to work for now, so if anybody has the same/similar issues, I hope this helps!
Final thought: it would be nice if there would be an option for screens to disable animations and swiping, so that we don’t have to abuse tab navigators to get the intended behaviour. Maybe that could be included in one of the following ThunkableX releases? (=feature request )
Thanks and happy Thunking!
Rob