Problem
Currently, everytime you click on an item on the sidebar, the whole page rerenders, This causes some jank with things like the top bar with the roadtrip name flickering. It also causes the sidebar to instantly disappear which is a bit jarring.
Changes Made
RoadTripPageWrapper made which has the context and wraps RoadTripPage
This wrapper creates a second BrowserRouter component
RoadTripPage is nested inside the RoadTripPageWrapper
My understanding of how this fix works: This second BrowserRouter means that when you click on an item on the sidebar, it redirects starting from the second nested BrowserRouter, which means that components above Router (such as the context) don't get mounted and unmounted (idk something like that)
Problem Currently, everytime you click on an item on the sidebar, the whole page rerenders, This causes some jank with things like the top bar with the roadtrip name flickering. It also causes the sidebar to instantly disappear which is a bit jarring.
Changes Made