How does react-router-dom open a child build without letting it display the parent component

Custom main.jsx renders a First,First with a Link in it and then opens Son,. How can I open Son,main and First without displaying them?

**main.jsx**

import React from "react";
import { BrowserRouter as Router, Switch,Route, Link } from "react-router-dom";
import "./main.css";
import First from "./First";
import Snd from "./Snd";
import Third from "./Third";
import Son from "./Son"
function A() {
  return (
    <Router>
      <div>
      <div>
          <Route exact path="/" component={First} />
          <Route path="/snd" component={Snd} />
          <Route path="/third" component={Third} />
        </div>
        <div
          className="footer"
          style={{
            height: 40,
            background: "-sharpeee",
            width: "100%",
            position: "fixed",
            bottom: "0",
            display: "flex"
          }}
        >
          <Link to="/"></Link>
          <Link to="/snd"></Link>
          <Link to="/third"></Link>
        </div>
        
      </div>
    </Router>
  );
}
export default A;
< hr >
***First.jsx***
import React from "react";
import { BrowserRouter as Router, Switch,Route, Link } from "react-router-dom";
import Son from "./Son"
function First(){
    return (
        <Switch>
            <div>
            <div style={{width:200,height:200}}>
                <Link to="/son"></Link>
            </div>
            <Route path="/son" component={Son}></Route>
            </div>
        </Switch>
        
    )
}
export default First;

switch, is used in this forum, but the path has changed, son is not rendered, and the bottom navigation bar is still displayed. Obviously what I wrote is wrong. Please take a look at

.
Jun.30,2021

Thank you for the invitation! Near the end of the day, give me an answer.
if you want the content of the component First and the component Son, to be displayed on the same page at the same time, remove the exact parameter or change the value to false. If you do not want the content of two components to appear on the same page at the same time, move the < Route path= "/ son" component= {Son} > < / Route > of the component First to main.jsx , and remember to delete Switch .


reply location wrong-

Menu