Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Nest Routes Not Working For Me #281

Open
chobo2 opened this issue Jan 26, 2017 · 1 comment
Open

Nest Routes Not Working For Me #281

chobo2 opened this issue Jan 26, 2017 · 1 comment

Comments

@chobo2
Copy link

chobo2 commented Jan 26, 2017

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

@PratyuSingaraju
Copy link

How did you resolve this. I am facing the same issue!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants