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
this.props.dispach(push(url))=>url changes but afte a while(3seconds) this error occurs:
dispatch
C:/Projekt/mmkng/my-app/node_modules/redux-first-router/dist/es/connectRoutes.js:211
208 | return function (action) {
209 | // We have chosen to not change routes on errors, while letting other middleware
210 | // handle it. Perhaps in the future we will explicitly handle it (as an option)
> 211 | if (action.error) return next(action); // code-splitting functionliaty to add routes after store is initially configured
| ^ 212 |
213 | if (action.type === ADD_ROUTES) {
214 | var _selectLocationState2 = selectLocationState(store.getState()),
If I instead use this code I do not get the error:
Let action=pathToAction(Url)
this.props.dispatch(action)
In redux-logger I see that the action is run twice but for dispatch(push) it is only logged once.
const routesMap = {
FOO: {
path: '/:client/:area?'
},
let url='/foo/bar'
this.props.dispach(push(url))=>url changes but afte a while(3seconds) this error occurs:
If I instead use this code I do not get the error:
Let action=pathToAction(Url)
this.props.dispatch(action)
In redux-logger I see that the action is run twice but for dispatch(push) it is only logged once.
The different actions look thesame except the second meta.prev.pathname differs
actions logged with discpatch(push(url))
{ type: 'FOO', payload: { client: 'foo', subpage: 'bar' }, meta: { location: { current: { pathname: '/foo/bar', type: 'FOO', payload: { client: 'foo', subpage: 'bar' } }, prev: { pathname: '/foo/', type: 'FOO', payload: { client: 'foo' } }, kind: 'push' } } }
actions logged with discpatch(action)
{ type: 'FOO', payload: { client: 'foo', subpage: 'bar' }, meta: { location: { current: { pathname: '/foo/bar', type: 'FOO', payload: { client: 'foo', subpage: 'bar' } }, prev: { pathname: '/foo/bar', type: 'FOO', payload: { client: 'foo', subpage: 'bar' } }, kind: 'push' } } } { type: 'FOO', payload: { client: 'foo', subpage: 'bar' }, meta: { location: { current: { pathname: '/foo/bar', type: 'FOO', payload: { client: 'foo', subpage: 'bar' } }, prev: { pathname: '/foo', type: 'FOO', payload: { client: 'foo' } }, kind: 'push' } } }
The text was updated successfully, but these errors were encountered: