Skip to content

Shallow routing using URL object.  #9862

@brookslyrette

Description

@brookslyrette

Is it possible to invoke shallow routing when using with-url-object?

I've tried using:

router.push(
    {
      pathname,
      query,
      shallow: router.pathname.includes(pathname),
    },
  )

Which always invokes getInitalProps

If I use:

router.push(
    pathname,
    pathname, // TODO: expand query params here
    {
      shallow: router.pathname.includes(pathname),
    },
  )

Shallow routing works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions