I'm using react and I came across a problem, albeit an aesthetic problem and not a functional one.
I am generating react-route
s from an API of names. The route works fine, but as the names have spaces, they appear in the url as: example.com/lookup/David%20Attenborough
Example: <Link to='{/lookup/' + props.data.name}>{props.data.name}</Link>
Is there a clever way I can remove the spaces: example.com/lookup/DavidAttenborough
or even with +
or -
to replace spaces without losing the structural integrity of react-router
.