Hi I’m working on an app that will serve as a relay for an alarm clock.
my problem is when I create a list and switch to another screen and then come back the list has disappeared
Domhnall, The issue is the entire state of the screen. Images API calls etc. What you would need to do is store everything in variables, and then when you slide back you have to reinstate all images and labels with the content of the variables.
Not ideal.
For example on the app I am working on I have 13 objects with content. A retain state of screen would be a nice feature.
Sure the results are instantaneous but now you have to manage two instances of each screen. Every time you make a change on one screen you need to build a process to reinstate that variable etc etc. This could be an automated feature. Return to Previous State. Creates an automatic cache of the screen.
I was trying to use a second screen to debug, and it turns out to be too problematic.
Is there a way to scroll down if you make a large label?
In the short term, if your app design allows for it, I might suggest placing your screens within a Tab or Drawer navigator. I believe that in those cases the state of the screens will be automatically maintained.
The problem with “plain” screens is that plain screens are placed in a default (and implicit) Stack Navigator and that the 'navigate to' block currently creates a new version of the screen that you are navigating to when your screens are within a Stack Navigator. We need to create a way to allow you to specify when you want to navigate to an already existing screen when using a Stack Navigator.