React router4.0 routing nesting

Code first as a token of respect


const routes = [
    {
        path: "/",
        exact: true,
        component: Main,
    },
    {
        path: "/company",
        // exact: true,
        component: CompanyIntroduce,
        routes:[
            {
                path: "/company/introduce",
                exact: true,
                component: CompanyManagement,
            },
            {
                path: "/company/management",
                exact: true,
                component: CompanyManagement,
            },
        ]
    },
];

const router = (
    <Router history={history}>
        <AppContainer history={history}>
            <Switch>
                {routes.map((route, i) => (
                    <ExtendRoute key={i} {...route} />
                ))}
                <Route component={NoMatchContainer} />
            </Switch>
        </AppContainer>
    </Router>
);

export default router;

wants to do a nested route, visiting / company and / company/introduce both points to CompanyIntroduce components, while accessing / company/management points to CompanyManagement components, but the fact is that it doesn"t matter whether I visit / company , visit / company/introduce , or visit / company/management , all point to . I don"t understand its usage. Compared with the routing of vue , it is really difficult to use and understand. I would appreciate it if the boss of the meeting can help me to see what the problem is.

This is described in the

documentation, and the reason for this is that the < Switch > package is not used.
We have a ready-made project, you can refer to it for yourself.
initial dav

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2c3da-2b350.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2c3da-2b350.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?