You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 26, 2018. It is now read-only.
i wrote a redux middleware , when @@router/LOCATION_CHANGE was triggered , i did the operation below.
if (action.type === '@@router/LOCATION_CHANGE') {
if (action.payload && action.payload.pathname === '/somePath') {
// set some other params to store.
store.dispath(anotherAction)
}
next(action)
}
when the path changed from '/pathA' to '/pathB?query=xxxx', and then changed to '/pathC'
i continuous call go(-1) or goBack(). In theory it should be pathC->pathB?query=xxxx->pathA,
but the actual situation is pathC->pathB?query=xxxx->pathC->pathB?query=xxxx.........
i changed the code like this then it will work fine.
if (action.type === '@@router/LOCATION_CHANGE') {
next(action)
if (action.payload && action.payload.pathname === '/somePath') {
// set some other params to store.
store.dispath(anotherAction)
}
}