This repository has been archived by the owner on Jan 27, 2021. It is now read-only.
growing number of reducer function calls ending with error #27
Labels
investigation required
We're not sure what's going on yet
Is it a bug, feature request or question?
the number of reducer function calls is growing on each dynamic reducer mounting
Which package(s) does this involve?
I am using only
"@redux-dynostore/core": "^2.0.0"
"redux-subspace": "^3.0.1"
my dependencies:
Input Code
I have a backend where I react when I attach or detach usb device by sending message to react app.
here is the block of code where I handle the attaching or detaching usb devices
This is my reducer
Expected Behavior
expect not getting growing number of reducer calls on each usb event
Current Behavior
dynamic reducer mounts perfectly and everything works as expected, but on the 22th usb event when one of my reducer ("controls") gets 31 calls I get error
Unexpected key "USB0" found in previous state received by the reducer. Expected to find one of the known reducer keys instead: "controls", "form", "blockField1", "blockField2", "blockField3", "blockField4". Unexpected keys will be ignored.
31 controls reducer default case -------------------------------------------------- controls.js:624
after each attach-detach cycle 3 new calls are being added for controls reducer.
Possible Solution
Context
To mount or unmount component I use reducers keys "USB0", "USB1" ...
with one usb device component is still getting mounted and unmounted, but when I have two devices they are not being unmounted, because dynamic reducer is not unmounted by redux.
Your Setup
this is my store
The text was updated successfully, but these errors were encountered: