reac报错处理

You should not use <Route component> and <Route children> in the same route, <Route component> will be ignored.

现象:页面无法渲染

      <Router history={history}>
        <Switch>
          <Route path="/" component={layout} >
            <Route path="home" component={home} />
            <Route path="content" component={content} />
          </Route>
        </Switch>
      </Router>

原因:react-router 4.0 以上报此警告

<Layout>
    <Route path="/home" component={home} />
    <Route path="/content" component={content} />
</Layout>
上一篇:[Docker]制作并发布 Docker 镜像


下一篇:记:处理zabbixserver和agent无法通信问题记录