Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

React router dom – Navigate to urls with special characters

Currently I started a project in react, using react router dom v6
I try to add special characters such as ‘?’ in the url, but I guess there is a mistake I’m doing, because it redirects to an empty page.

So my question is, can I create any page using an url with special characters (e.g. /cars?search)? If that’s the case, how can I do that?

And another question is if I can use that type of urls, can I add params to it (e.g. /cars?search=toyota)? How can I do it?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Thanks in advance

>Solution :

Please don’t use non-alphanumeric characters in the URL. Some characters like ?, = &, /, have special meanings in URLs. ? used for query

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading