Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicative Routes #96

Closed
cancan101 opened this issue Apr 28, 2015 · 2 comments
Closed

Duplicative Routes #96

cancan101 opened this issue Apr 28, 2015 · 2 comments

Comments

@cancan101
Copy link

Why is this written like this:

var Routes = (
  <Route handler={<%= scriptAppName %>}>
    <Route name="/" handler={<%= scriptAppName %>}/>
  </Route>
);

as opposed to just:

var Routes = (
  <Route path="/" handler={<%= scriptAppName %>} />
);
@newtriks
Copy link
Member

newtriks commented May 1, 2015

Most likely either an approach to an older version of react router, or I simply added a route as an example. I am not sure. If you want to make the change, test and send a pull request I will happily merge.

@weblogixx
Copy link
Member

I think this was to make nested rules possible and easier to do something like this:

var Routes = (
  <Route handler={<%= scriptAppName %>}>
    <Route name="/" handler={<%= scriptAppName %>}/>
    <Route name="/test" handler={TestHandler}/>
  </Route>
);

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

No branches or pull requests

3 participants