Skip to content

History pathname can no longer contain the search query and/or hash #909

@shesek

Description

@shesek

Before #890, it was possible to send { type: 'push', pathname: '/foo?bar#xyz' } to the history sink and have it properly processed by the history driver.

As of #890, now that the pathname is passed inside an object, this no longer works and requires { type: 'push', pathname: '/foo', search: '?bar', hash: 'xyz' } instead.

I guess this makes sense, but I think this should be made more clear in the changelog of v7.2.0 (and might even warrant a major version bump?).

More importantly though, this broke the captureClicks functionality for links with a search query or a hash, because captureClicks still welds the pathname/search/hash together into a single string.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions