ctrlplusb / easy-peasy

Vegetarian friendly state for React

Home Page:https://easy-peasy.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Migrating from 3.x to 5.x: Mismatch in local storage keys

PupoSDC opened this issue · comments

Hello everyone!

Im trying to migrate an app from v3.x all the way to v5.x and i noticed something that does not appear to be documented on the change log, or brought up in any issue. Our state model consists of a collection of some 5 different sub-models which are stored by easy-peasy version 3 in the local storage under 5 different keys of the like:

[EasyPeasyStore]@ReminderState
[EasyPeasyStore]@ProgressState
// etc....

Unfortunately, when migrating to 5.x, these keys are no longer called for, and instead, the same model calls only for:

[EasyPeasyStore][0]

Any idea how to untangle this? During this migration we cant afford to loose user data.

My apologies @PupoSDC. There were lots of breaking changes in terms of the persist APIs moving across versions as I identified a host of bugs and less than optimal code.

You asked this a while ago. Did you manage to come to a solution?

@ctrlplusb Unfortunately I didn't, but the project for which this was necessary has now been terminated. The App was a bit flawed in design anyway, as the local state was the only place where this information was persisted, which made us extremely vulnerable to these kind of changes.

Thanks for having a look, I will close this issue, since it no longer applies to me, and it involves a rather old version of easy peasy.

Cheers!