Skip to content

Document params must be strings, numbers, or arrays of these (for repeated params) in programmatic navigation #873

@laurikihva

Description

@laurikihva

Version

4.0.6

Reproduction link

https://codesandbox.io/s/dawn-pine-4yc98

Steps to reproduce

  1. Press button on Home page which routes to About page with undefined id param.
  2. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsConcerns the documentation content or the documentation website

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions