FormidableLabs / redux-little-router

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

query value in payload is different in ROUTER_PUSH vs. ROUTER_LOCATION_CHANGED #254

Open ggrillone opened 6 years ago

ggrillone commented 6 years ago

Here is my use case:

I dispatch a push action dispatch(push({ pathname: '/my-route', query: { status: ['online'] }})

When adding logging around routing, when the ROUTER_PUSH payload looks like:

{
  ...
  query: { status: ['online'] }
}

But then when the ROUTER_LOCATION_CHANGED action is dispatched, the query value changes to:

{
  ...
  query: { status: 'online' }
}

so essentially something is turning that from an array with a single string value to just a string