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
@gentholb & I stumbled on a tenacious problem yesterday, and after hours trying and succeeding in fixing it, we thought it would be interesting to document it here. The issue can be closed if need be.
The problem
When rehydrating, the arrays in our Redux store would be substituted by Immutable Maps.
Instead of this:
entities: [{index: 1},{index: 2}]
The following structure was loaded into the store:
entities: {0: {index: 1},1: {index: 2}}
This was breaking our app since we were using #Array.findIndex in our reducer, which does not work with Maps.
Migrated to the @actra-development-oss/redux-persist-transform-filter-immutable version of the plugin, which is the one linked from the README (but unfortunately not the one registered on NPM…), which declares [email protected] as a dependency
Updated our version of immutable to 3.8.2
Hope this can help!
Thanks
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Hi!
@gentholb & I stumbled on a tenacious problem yesterday, and after hours trying and succeeding in fixing it, we thought it would be interesting to document it here. The issue can be closed if need be.
The problem
When rehydrating, the arrays in our Redux store would be substituted by Immutable Maps.
Instead of this:
The following structure was loaded into the store:
This was breaking our app since we were using
#Array.findIndex
in our reducer, which does not work with Maps.I had the following dependencies in my app :
The solution
It turns out that the problem has been documented here and is caused by multiple Immutable versions being loaded in the app.
The https://github.com/ntucker/redux-persist-transform-filter-immutable library declares [email protected] as a dependency, which was causing Immutable to be loaded twice.
We then :
@actra-development-oss/redux-persist-transform-filter-immutable
version of the plugin, which is the one linked from the README (but unfortunately not the one registered on NPM…), which declares[email protected]
as a dependencyHope this can help!
Thanks
The text was updated successfully, but these errors were encountered: