React-router-dom second-level routing refresh will find the page.

import React, {Component} from "react";
import {BrowserRouter as Router,Route,Link,Switch,Redirect} from" react-router-dom";// introduces routing
import {Button} from "react-bootstrap";
import". / Home.css"
import HomeSection from". / HomeOne/HomeOne";
import HomeOneContext from". / HomeOneContext/HomeOneContext"

/ / this is a secondary route
class Home extends Component {

render() {
    return (
        <div>
            <Router>
                <div>
                    
                    <HomeSection />
                    <Switch>
                        <Route exact path="/" component={HomeOneContext}/>
                        <Route  path="/homeonecontext" component={HomeOneContext}/>
                    </Switch>
                </div>
            </Router>
        </div>
    );
}

}

export default Home;

this is my code

clipboard.png

clipboard.png

clipboard.png
I hope God can take a look at it for me

Mar.06,2021

BrowserRouter is equivalent to sending a request to the backend, which needs to be redirected to the index page


change the BrowserRouter mode to hash Mode. Or let the backend modify it with you to use BrowserRouter

reference:
official: ide.github.io/react-router-cn/docs/guides/basics/Histories.html" rel=" nofollow noreferrer "> https://react-guide.github.io.
blog: http://blog.codingplayboy.com.

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-1e4c1ce-44e9d.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-1e4c1ce-44e9d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?