FormidableLabs / redux-little-router

A tiny router for Redux that lets the URL do the talking.
MIT License
1.04k stars 114 forks source link

LOCATION_CHANGED action doesn't remember the query when going back (POP) #233

Closed merisbahti closed 6 years ago

merisbahti commented 6 years ago

When moving back to a location with query-parameters, the router seems to have omitted the query-parameters the initial LOCATION_CHANGED-action was called with (even though the POP-action has the query-parameters)

I've included below which actions have to be dispatched to reproduce the issue.

ROUTER_LOCATION_CHANGED {param: "foo"}
ROUTER_PUSH {param: "bar"}
ROUTER_LOCATION_CHANGED {param: "bar"}
ROUTER_POP {param: "foo"}  // Why does this have {param: "foo"} and the next action doesn't?
ROUTER_LOCATION_CHANGED undefined  // Expected: ROUTER_LOCATION_CHANGED {param: "foo"}
jahed commented 6 years ago

Same as #211

tptee commented 6 years ago

Yep, duplicate of #211 which is a high-pri bug!