react-router-component icon indicating copy to clipboard operation
react-router-component copied to clipboard

Error setting contextual locations could cause infinite loop

Open mattatcha opened this issue 11 years ago • 1 comments

If you don't set contextual on a contextual route it could cause the browser to redirect indefinitely. I accidently did this in Chrome and the only way to stop it was to kill the tabs process.

MainPage

<Locations hash>
  <Location path="/" handler={MainPage} />
  <Location path="/users/*" handler={UserPage} />
</Locations>

UserPage

<Locations>
  <Location path="/" handler={UserListPage} />
  <Location path="/:username" handler={UserPage} />
</Locations>

mattatcha avatar May 09 '14 10:05 mattatcha

Not sure if this is in fact related, but while reading the RouterMixin sources I came across this while loop and wondered if this could result in infinite loops under certain circumstances.

fgnass avatar Jul 07 '14 10:07 fgnass