Start Event Timing for Tab and Drawer Navigators

drted
Thu, 05 Nov 2020 11:44:25 +0000
Questions about Thunkable

I’ve discovered some interesting timing issues for the Start Events for different navigator components. I am not sure if these behaviors are by design, but I thought I’d share them here, as they can have profound impacts on how apps work.

For the Drawer navigator, the start event of a screen only occurs when the screen is first navigated to. This is consistent with non-navigator screen behavior. Data Change events will not become active until the screen has been opened, which is kind of a bummer if you app has multiple screen which are listening for changes. The user must navigate to each screen each time the app is opened for the listeners to work.

For the Top Tab navigator, when ANY screens in the navigator is opened, the start event for ALL screens in the navigator begin execution. If more than one sceen has an synchronous call (e.g. Web API, Firebase Get, etc.), the results can get wierd or cause the app to crash. But on the good side, this does allow all screens to “pre-populate” in the background. It also allows mulitple screens to start firebase listeners at start up, also not a bad thing.

4 posts - 3 participants