MENU
<HashRouter>
This is a <Router> that uses the hash portion of the URL (i.e. window.location.hash) to keep your UI in sync with the URL.
For instance, when you send www.mywebsite.com/#/person/john, the server gets www.mywebsite.com and client-side React handles '/person/john/' . The # part is used to prevent us from sending repeated GET requests. Server-side routing is thus independent from client-side routing.
RESETRUNFULL
<HashRouter
basename={optionalString}
getUserConfirmation={optionalFunc}
hashType={“slash" | “noslash" | “hashbang"}>
<App /></HashRouter>
<HashRouter
getUserConfirmation={(message, callback) => { // this is the default behavior
const allowTransition = window.confirm(message);
callback(allowTransition);
}}>…
"slash" - Creates hashes like #/ and #/sunshine/lollipops
"noslash" - Creates hashes like # and #sunshine/lollipops
"hashbang" - Creates “ajax crawlable” (deprecated by Google) hashes like #!/ and #!/sunshine/lollipops