Why the location from routerReducer is "null" but not what I see from my browser url?

Why the location from routerReducer is "null" but not what I see from my browser url?
0.0 0

#1

I run the react-cool-starter boilerplate , and try to make a modification so that in its action/user file, I console.log the “states”.

export const fetchUserIfNeeded = (userId: string): ThunkAction => (
  dispatch: Dispatch,
  getState: GetState
) => {
  /* istanbul ignore next */
  if (shouldFetchUser(getState(), userId)) {
    /* istanbul ignore next */
    console.log(getState());
    return dispatch(fetchUser(userId));
  }

  /* istanbul ignore next */
  return null;
};

Console outputs

{ home: { readyStatus: 'USERS_INVALID', err: null, list: [] },
  userInfo: {},
  router: { location: null } }

I thought when the url is shown in the browser url, such as localhost:3000/user/3, it represents the location, so there would be a location.pathname, which is the path after the hostname, eg. /user/3

As the documentation says

Locations represent where the app is now, where you want it to go, or even where it was.

Do I misunderstand anything?

Thanks


#2

How does router.location get set?