Closed vindennt closed 1 year ago
handleQuickStartUpdate() in Trip.tsx causes rerenders. Similar problem to issue #12. Disabling it cauises the multiple rerenders to stop.
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:
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.
confirmed not the app navigator rerendering, only Missions.tsx
Issue located: updating last_used_station in the updateRequest on Trip.tsx would cause rerenders.
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.