question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Use indexRedirect in route's configuration object

See original GitHub issue

Hello,

I tried to use indexRedirect in a route configuration object, but it seems that it’s ignored.

Would it be possible to add it with a syntax like :

indexRedirect: { to: "path" },

Thanks to all the contributors for this awesome library.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
taioncommented, Mar 4, 2016

No – the issue tracker is not the place for support questions.

0reactions
jgouxcommented, Mar 4, 2016

@timdorr This doesn’t work for me, I also have an infinite redirect loop, like the last comment on the issue : https://github.com/reactjs/react-router/issues/2256#issuecomment-151993906

The route in question :

import { view } from "./view"
import { update } from "./update"
import { route as rechercheRoute } from "./components/Recherche"
import { route as saisieRoute } from "./components/Saisie"

export const route = {
  component: view,
  reducer: update,
  onEnter: (_, replaceState) => { replaceState(null, saisieRoute.path) },
  childRoutes: [
    rechercheRoute,
    saisieRoute
  ]
}

I assume I have to find the way to redirect only when no child is matched (this is what IndexRoute does).

Sorry to bother you all, I’ll continue on stackoverflow/discordapp instead,

have a nice day ! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Feature Request] Use indexRedirect in route's configuration ...
Hello, I tried to use indexRedirect in a route configuration object, but it seems that it's ignored. Would it be possible to add...
Read more >
Using indexRedirect in a route configuration object
As described in the docs, the equivalent to indexRedirect using a plain configuration object looks like this const routes = [{ path: '/' ......
Read more >
Routing - Ninja Framework
This interface defines a method called public void init(Router router) {…} which allows us to map incoming requests to controllers and their methods....
Read more >
FortiNAC FortiGate VPN Integration - Amazon AWS
FortiGate sends RADIUS authentication request to FortiNAC. ... Via the UI or CLI, configure Address objects for the VPN IP addresses.
Read more >
Running a Bokeh server
Bokeh server makes it easy to create interactive web applications that connect front-end UI events to running Python code. Bokeh creates high-level Python ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found