As alluded to in #172, it looks like the persistQuery option doesn't work when you dispatch a push action directly.
From what I can tell, when you dispatch push directly, it immediately hits the middleware, which updates the url immediately with the unmerged query. After this happens, the action hits the reducer, which then merges the existing query params with the new ones and updates the redux store.
I'm not familiar enough yet with Redux to know what the correct thing to do here is except make the middleware do the merging before calling any history methods.
As alluded to in #172, it looks like the
persistQuery
option doesn't work when you dispatch apush
action directly.From what I can tell, when you dispatch
push
directly, it immediately hits the middleware, which updates the url immediately with the unmerged query. After this happens, the action hits the reducer, which then merges the existing query params with the new ones and updates the redux store.I'm not familiar enough yet with Redux to know what the correct thing to do here is except make the middleware do the merging before calling any
history
methods.