September 2018
Beginner
156 pages
3h 28m
English
The <NavLink> component also supports the strict prop, which can be used to match the trailing slash specified in the to prop:
<NavLink to="/dashboard/" activeClassName="selectedLink" strict> Dashboard</NavLink>
Here, the class selectedLink is applied to the <NavLink> component only when the browser's URL path matches the path /dashboard/—for example, when a trailing slash is present in the URL.
Read now
Unlock full access