Version
4.0.6
Reproduction link
https://codesandbox.io/s/dawn-pine-4yc98
Steps to reproduce
- Press button on
Home page which routes to About page with undefined id param.
- Undefined
id param is included in the URL & passed to About page as string
What is expected?
Undefined params are not passed to URL & on the redirected page this param value should also be undefined
What is actually happening?
Undefined is passed to the URL & is usable on the destination page as a string
Also happens if id is passed as null.
Doesn't matter if param is optional or not:
path: "about/:id"
path: "about/:id?