[Office Hours] onAppear Async function has to be navigated to twice to load. #86
Unanswered
terribilis
asked this question in
Office Hours
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Related Discussion
The issue is that on the Stronger app if you log in and go to the Home page. There is a query to firebase that is called at onAppear. It updates the values of the selectedWeek and then the view ExerciseView as well pulls in the recent workout information from Firebase. However these values don't get updated until you navigate using the tabs once or twice. My understanding is that onAppear or even Task should both run when the view loads and then update anything. However this isn't what happens.
Reproduction
This can be reproduced by logging into the app using the login info
[email protected]
password
Then navigate to Home.
Navigate back and forth between Home and Workout and see how the home page updates after a few switches.
Additional context
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions