-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reducer misfiring, undetected by extension #326
Comments
Whenever you invoke |
It sure has something to do with I can stop the bug from happening by not replacing my reducers in for code splitting reasons, which might be an acceptable workaround for now. |
@funwithtriangles setting |
Looking into it a bit further, setting I feel that there's always going to be some sort of price to pay in order to use redux-dev-tools and |
Well, initially When disabling this feature (setting |
Unfortunately I'm getting errors like this:
|
Seems that there are edge cases indeed. I'll add some tests to see what is happening in this case. If you can add a test to reproduce it here, it would be much appreciated. |
@zalmoxisus thanks a bunch for looking into this! I've had a look at those tests and I'm not sure if my knowledge in the whole area is strong enough to be successful reproducing the issue. |
I've spent a bit more time looking into this, injectReducer(store, { key: 'transactions', reducer })
console.log(store.getState().transactions) // undefined
setTimeout(() => {
console.log(store.getState().transactions) // yay we have stuff!
}, 100) And here's the code for export const injectReducer = (store, { key, reducer }) => {
if (Object.hasOwnProperty.call(store.asyncReducers, key)) return
store.asyncReducers[key] = reducer
store.replaceReducer(makeRootReducer(store.asyncReducers))
} Is this async type behaviour something to do with latency coming from the devtools? I've tried |
I'm sorry for the delay on this issue. I just published version If setting |
My app has a bug that doesn't happen when redux-devtools-extension is disabled. One of my reducers is dealing with an action twice, that has only been dispatched once. I can outline the situation:
Action A cannot be seen in the log a second time, but if I console log inside the reducer, I see the reducer is indeed experiencing the action twice. Checking where the action is being dispatched from, this only happens once.
I realise this is a vague explanation but I'm just wondering if there have been any similarly known issues like this? I've tried a number of things (latency, serialize) to no avail.
The text was updated successfully, but these errors were encountered: