You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since this came up multiple times, I think we should say in the documentation that params must be strings
posva
added
the
docs
Concerns the documentation content or the documentation website
label
Apr 9, 2021
posva
changed the title
Undefined params included in the url
Document params must be strings, numbers, or arrays of these (for repeated params) in programmatic navigation
Apr 9, 2021
Version
4.0.6
Reproduction link
https://codesandbox.io/s/dawn-pine-4yc98
Steps to reproduce
Home
page which routes toAbout
page with undefinedid
param.id
param is included in the URL & passed toAbout
page asstring
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 asnull
.Doesn't matter if param is optional or not:
path: "about/:id"
path: "about/:id?
The text was updated successfully, but these errors were encountered: