Skip to content

State out of date when switching routes #530

@jondashkyle

Description

@jondashkyle

Expected behavior

When attaching a callback to state.events.NAVIGATE, and navigating to a new route, I expect state.route to represent the current route.

Actual behavior

Instead, state.route is out of date. It should displaying the current route, but instead shows the previous. For example, if navigating from a route called /cute to one called /nice, it will return /cute.

function model (state, emitter) {
  emitter.on(state.events.NAVIGATE, function () {
     console.log(state.route)
  })
}

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