September 2018
Beginner
156 pages
3h 28m
English
The hashType prop is used to specify the encoding method to use for window.location.hash. The possible values are slash, noslash, and hashbang.
Let's take a look at how the URLs are formed when you include the hashType prop with one of these values:
<HashRouter hashType="slash"> <App /></HashRouter>
When you specify slash as the value to the hashType prop, a slash (/) is added after the hash (#). Thus, the URLs will be of the forms —#/, #/dashboard, #/user, and so on.
Similarly, when the value of the hashType prop is noslash, the URLs are of the forms —#, #dashboard, #user ...
Read now
Unlock full access