react-router-component
react-router-component copied to clipboard
Error setting contextual locations could cause infinite loop
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>
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.