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

why do you duplicate route inside the file routeConfig.js #209

Open
cesc1802 opened this issue Dec 20, 2019 · 1 comment
Open

why do you duplicate route inside the file routeConfig.js #209

cesc1802 opened this issue Dec 20, 2019 · 1 comment

Comments

@cesc1802
Copy link

i have got a question. why do you duplicate route inside routeConfig.js and please provide the context to use it

@danielo515
Copy link

I have the same doubth.
I wonder why use the isIndex property hack instead of just handling the routes as any other react-router way. I mean, that you just descibe the main route of a feature like this:

export default {
  path: '/',
  name: 'Home',
  childRoutes: [
    { path: '',
      name: 'Default page',
      component: DefaultPage,
    },
  ],
};

It is much simpler to understand (and is how the /examples works). What is the value in having to remember that

export default {
  path: '/',
  name: 'Home',
  childRoutes: [
    { path: 'default-page',
      name: 'Default page',
      component: DefaultPage,
      isIndex: true
    },
  ],
};

Means that such route will be duplicated as injected as path: ''?

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

2 participants