[英]React-Router: Failed prop type: Invalid prop `component` supplied to `Route` in route
I have no idea what the issue is here and have tried many other solutions but none work. 我不知道这里是什么问题,并且尝试了许多其他解决方案,但没有任何效果。 Any help would be appreciated to fix this error.
任何帮助将不胜感激以解决此错误。 Thank you
谢谢
"react-router": "^2.8.1"
dashboard.js (excerpt) dashboard.js(节选)
<div className="dash-container">
{this.props.list}
{this.props.job}
{this.props.children}
</div>
routes.js (excerpt) route.js(节选)
<Route path="/" component={App}>
<IndexRoute component={Landing} />
<Route path="dashboard" component={Dashboard}>
<Route path="jobs" component={{ list: ListContainer }} />
<Route path="jobs/:id" component={{ list: ListContainer, job: JobsDetails }} />
<Route path="accounts" component={AccountsDetails} />
</Route>
</Route>
server.js (excerpt) server.js(节选)
<MuiThemeProvider muiTheme={getMuiTheme({ userAgent: 'all' })}>
<Provider store={createStoreWithMiddleware(reducers)}>
<RouterContext {...renderProps} />
</Provider>
</MuiThemeProvider>
One component, multiple component s : 单组分,多组分S:
<Route path="/" component={App}>
<IndexRoute component={Landing} />
<Route path="dashboard" component={Dashboard}>
<Route path="jobs" component={ListContainer} />
<Route path="jobs/:id" components={{ list: ListContainer, job: JobsDetails }} />
<Route path="accounts" component={AccountsDetails} />
</Route>
</Route>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.