Hello there!
I need help with an issue: I want to go from screen1 to screen2 and put a text to a label on screen2 (actually I want to load an image on screen2 but that does not matter:
Or for everybody to understand: On Screen 1 is a text in a label, I want to press a button next to the label and then it should go to screen2 and set a label on screen2 to the same text.
As far as I can tell the Screen.Starts block only runs when the app is loaded.
The lack of communicating between screens is not good…
I made a REFRESH button on the consumer screen - but that is not a good solution. Timers can work - but it seems that concurrency issues show up when writing to a database on one screen while reading from the same database on another screen (e.g. when the app loads).
My solution is to change screens with DrawerNavigator. That works. When the Navigator starts the screen, data is correct transferred with local storage.
Would that help?
thx @losmobilos and @rollke for your reply . that saves me a lot of testing.
I will check the Solution with the drawerNavigator later on.
What else could be a thing to consider, is to build a one-screen-app. this was the way to go in nearly every thunkable-android-app I made, because Screen-Switching always had bad implications.
Maybe some of the developers can make a statement on this?!
All good things come in threes… Finally the StackNavigator was the perfect solution for me:
I was able to send values with using the LocalStorage from one screen to another.
Thank you guys once again for your support and of course big hand for developer of StackNavigator !!!
Here is a small test app for screens. Starting with a start screen you can change screens with a DrawerNavigator. Each screen stores its name and tells from which screen it was chosen.
Thanks thunksters for pointing out this bug! We’re sorry for the trouble that it has caused. We have noted the issue and have placed the bug in our queue to be fixed.