rekit
rekit copied to clipboard
why do you duplicate route inside the file routeConfig.js
i have got a question. why do you duplicate route inside routeConfig.js and please provide the context to use it
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: ''?