vindennt / Skytrainer

Productivity habit forming app using React Native and mobile gacha game design principles.
1 stars 0 forks source link

Bugfixes #22

Closed vindennt closed 1 year ago

vindennt commented 1 year ago
vindennt commented 1 year ago

handleQuickStartUpdate() in Trip.tsx causes rerenders. Similar problem to issue #12. Disabling it cauises the multiple rerenders to stop.

vindennt commented 1 year ago

New issue. Removing handling of quickstarts only prevents manual trips from causing rerenders. Quickstarts still trigger multiple rerenders, even without any quickstart state updates. Next steps:

vindennt commented 1 year ago

Running 2 different quickstarts consecutively causes double rerende (so trip runs 3 times)r, while running the same quickstart consecutively will have the 2nd run not cause a rerender. Inpspect why running a different quickstart causes rerender.

We know that mission itself is rerendering and running the function again because the useEFfect runs before each redundant execution.

vindennt commented 1 year ago

confirmed not the app navigator rerendering, only Missions.tsx

vindennt commented 1 year ago

Issue located: updating last_used_station in the updateRequest on Trip.tsx would cause rerenders.

vindennt commented 1 year ago

Issue resolved by moving the hanlding of lastUsedStation to MIssions page instead of the navigation stack, preventing the navigation stack from rerendering when Trip.tsx called redux update to lastUsedStation, causing the whole nav stack to rerender and causing the navigation hook to re-navigate to the Trip page.