Open eamonpenland opened 7 years ago
code superficially looks correct. I apologize I am not sure beyond that and as I am not currently using immutable it is hard for me to take a look. If you figure the issue out please report back!
We have a similar issue where our Immutable.List
is coming back as a Immutable.Map
using redux-persist@4.6.0
and redux-persist-transform-immutable@4.2.0
. This may be upstream and related to this issue. We were able to solve this for now by rolling back to redux-persist@4.0.0
and to redux-persist-transform-immutable@4.1.1
. This also only seems to happen when using AsyncStorage
with react-native
.
@rynbyjn I just noticed this was happening for me too. Thanks for the tip!
that is unfortunate. @rynbyjn what do you recommend for solving this at the lib level?
seems this might best be solved by making immutablejs a peer dep..
It's early days, but for the moment I was able to resolve this in our apps by requiring react-redux >= 5.0.4.
React-redux 5.0.4 was a red herring for us. At the moment, I'm not aware of any version combination that works reliably with deep trees of mixed Immutables, e.g., Map.Map.OrderedSet.Map. Rehydration always breaks something somewhere. 4.6.0 + 4.2.0 doesn't seem to help either, although it's hard to say because an area that rehydrates incorrectly one day, will seemingly work the next.
Any alternatives or workarounds others have found?
+1
+1
just published 4.3.0 with immutable as a peer dep and updated transit deps. Hopefully this helps the situation.
No - List is still rehydrating as a Map with v4.3.0.
Hey having trouble to get my immutable records to rehydrate as a Record. Here is my code.
Any ideas?