React-router-dom v4 nested routes not working

前端 未结 2 1969
悲哀的现实
悲哀的现实 2021-02-05 19:39

In reference to the unresolved question (as a final conclusion)

  • Multiple Nested Routes in react-router-dom v4
  • How to nest routes in React Router v4?
2条回答
  •  南旧
    南旧 (楼主)
    2021-02-05 20:31

    I'll be honest, I'm not entirely sure what you're asking. I'm assuming you're trying to get your "Something not working" example to work.

    Something like this,

    import * as React from 'react'
    import {BrowserRouter as Router, Route, Switch } from 'react-router-dom'
    
    
    export const Routes = () => (
      
        
    )

提交回复
热议问题