September 2018
Beginner
156 pages
3h 28m
English
A <Route> component's path is not case-sensitive, that is, a <Route> component with its path prop value set to '/Dashboard' would match the '/dashboard' or '/DASHBOARD' URL path. To make a <Route> component's path case-sensitive, add the sensitive prop:
<Route path="/Dashboard" component={DashboardComponent} sensitive/>
The sensitive prop ensures that the path prop's case is taken into consideration when matching it with the browser's URL path. By adding the sensitive prop, one can define routes with the same pathname, but do so using a different case:
<Route path="/Dashboard" component={DashboardComponent} sensitive/><Route path="/dashboard" component={StockListComponent} sensitive/>
This code would create two distinct ...
Read now
Unlock full access