Navigation Objects

The navigation object contains information about the previous location and how the user navigated to the current location.

A navigation object has two properties: action and previous.

  // the type of navigation,
  // either push, replace, or pop
  action: 'push',

  // the previous response object
  // or null for the initial response
  previous: {
    name: 'Home',


What is the point of the navigation object? It is there to provide you information about a navigation that doesn't make sense to attach to a response object.

One usage of it would be to display a Pinterest/Twitter style modal. You could render the background using the previous response while rendering the modal using the new response.

Another use case may be to determine how to transition between two locations, either using the action to determine how the application navigated or the previous response to map between two routes.