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
When trying to migrate from a non-immutable to an immutable state, I would like to be able to read the old & non-immutably stored values in order to set up the new immutable state.
However the process fails due to unexpected token o in json at position 1.
In my opinion, this can be due to the fact that redux-persist-immutable adds the immutableTransforms to any subState, and the redux-persist-transform-immutable does not check if raw is already a json before applying transitInstance.fromJSON(raw).
A simple modification like the following to redux-persist-transform-immutable should allow to retrieve from the store something which was stored by means of redux persist in a non immutable way, permitting a transition to immutability.
Given that I'm proposing a modification to redux-persist-transform-immutable maybe it is not totally correct to write here. However I thought that others may try to migrate to immutability via redux-persist-immutable so I feel it could be more interesting for others to see this issue in redux-persist-immutable context.
The text was updated successfully, but these errors were encountered:
When trying to migrate from a non-immutable to an immutable state, I would like to be able to read the old & non-immutably stored values in order to set up the new immutable state.
However the process fails due to
unexpected token o in json at position 1
.In my opinion, this can be due to the fact that redux-persist-immutable adds the immutableTransforms to any subState, and the redux-persist-transform-immutable does not check if
raw
is already a json before applyingtransitInstance.fromJSON(raw)
.A simple modification like the following to redux-persist-transform-immutable should allow to retrieve from the store something which was stored by means of redux persist in a non immutable way, permitting a transition to immutability.
Given that I'm proposing a modification to redux-persist-transform-immutable maybe it is not totally correct to write here. However I thought that others may try to migrate to immutability via redux-persist-immutable so I feel it could be more interesting for others to see this issue in redux-persist-immutable context.
The text was updated successfully, but these errors were encountered: