docs/assets/app.js
function handleLocationChange(location) {
    // ... unless we just caused that location change
    if (isTimeTraveling) {
      return;
    }

    // Remember where we are
    currentLocation = location;

    // Are we being called for the first time?
    if (!initialLocation) {
      // Remember as a fallback in case state is reset
      initialLocation = location;

      // Respect persisted location, if any
      if (getLocationInStore()) {
        return;
      }
    }

    // Tell the store to update by dispatching an action
    store.dispatch({
      type: _reducer.LOCATION_CHANGE,
      payload: location
    });
  }
function handleLocationChange(location) {
    // ... unless we just caused that location change
    if (isTimeTraveling) {
      return;
    }

    // Remember where we are
    currentLocation = location;

    // Are we being called for the first time?
    if (!initialLocation) {
      // Remember as a fallback in case state is reset
      initialLocation = location;

      // Respect persisted location, if any
      if (getLocationInStore()) {
        return;
      }
    }

    // Tell the store to update by dispatching an action
    store.dispatch({
      type: _reducer.LOCATION_CHANGE,
      payload: location
    });
  }
function handleLocationChange ( location ) { // ... unless we just caused that location change if ( isTimeTraveling ) { return ; } // Remember where we are currentLocation = location ; // Are we being called for the first time? if ( ! initialLocation ) { // Remember as a fallback in case state is reset initialLocation = location ; // Respect persisted location, if any if ( getLocationInStore ( ) ) { return ; } } // Tell the store to update by dispatching an action store . dispatch ( { type : _reducer . LOCATION_CHANGE , payload : location } ) ; }
Whenever location changes, dispatch an action to get it in the store
Whenever location changes dispatch an action to get it in the store