Closed taion closed 8 years ago
On second thought, this is fine, and it's consistent with redux-simple-router.
I was keeping this open in case this popped up. I have had an SPA running with alt + alt-router for the past few months and was keeping an eye out on this.
Thanks for closing though :)
https://github.com/altjs/router/blob/v1.2.0/src/AltRouter.js#L105
cf https://github.com/rackt/react-router/issues/2502
This
history.listen
listens to the "raw" history, and fires when the user initiates a transaction, and fires with the new location.I behaves quite differently from calling
history.listen
on the wrapped history that theRoutingContext
exports on context - that one invokes the callback with router errors and router state (params, routes, &c.), and in the case of async routes only fires after the transition fully completes (i.e. potentially after the callback set up above fires).Not sure if this is intentional - seems odd at first glance.