4
我在想下面例子中IndexRoute
和DefaultRoute
有什麼區別?據我瞭解,這兩種情況下Home
將呈現,對吧?反應路由器:IndexRoute與DefaultRoute
<Route path="/" handler={App}>
<IndexRoute handler={Home}/>
<Route path="about" handler={About}/>
</Route>
和
<Route path="/" handler={App}>
<DefaultRoute handler={Home}/>
<Route path="about" handler={About}/>
</Route>