Skip to content

Add an example with new URL() to handle query string params #46

@edysegura

Description

@edysegura
const newUrl = new URL(window.location.href)
newUrl.searchParams.delete(param)
newUrl.searchParams.set(param, value)
window.history.pushState({ path: newUrl.href }, '', newUrl.href)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions