react to hashchange event as well