Skip to content

How to getPathname(), getQuery() in 1.0.0? #1562

Closed
@jedwards1211

Description

@jedwards1211

I had some code like the following using router v0.13:

  onGaugeClick(blockId) {
    this.transitionTo(this.getPathname(), {}, {editBlock: blockId});
  },

The idea being that if I change the route to this particular component, it won't break this method.

Why were getPathname() and getQuery() removed from the State mixin in 1.0.0? Did some kind of philosophical opposition to these develop?

It's very convenient to be able to code up components that can modify the query in a route-agnostic way.

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