Nest Routes Not Working For Me
Opened this issue · 1 comments
I have these scenarios
Settings Page -> Results Page -> Details Page
User chooses settings, clicks next, gets results and then clicks into more details.
Details Page -> Results Page
User goes back to Results page from Details Page. This causes a full re-render, causing me to hit the server again for no point(I have the results stored in an array).
Details Page -> Results Page -> Settings Page -> Results Page
The user goes to details, then back to results(want to grab stored results), then goes back to settings page, makes changes and then goes back to results page(now I want a full grab from server again).
I am wondering if there is away in react router to determine if I came to the page via the browser history or if I was going in a forward motion.
I tried
<Route path="results"component={Results}>
<Route path="/results/:id"component={Details} />
<Route path="results"component={Results}>
<Route path=:id"component={Details} />
both just change url but nothing else
How did you resolve this. I am facing the same issue!