I use NavLink to bold active link, but some of my link contain space and don't get bold when clicked, how to fix ?
categories.map((c,i) => (
<NavLink
key={i}
exact
activeClassName="is-active"
to={`/series/category/${c}`}
>
{c}
</NavLink>
))
I know for sure that it is due to the spaces because when I do this, links bold correctly (but the redirection doesn't work as my pages must contain space) :
to={`/series/category/${c.replace(/\s/g, "")}`}
Red squared links won't get bold.
This trick does the job :
to={`/series/category/${c.replace(/\s/g, "%20")}`}