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
In the example of readme, one can persist in this way:
class SomeItem { @persist @observable name = 'some' }
This is nice and straightforward, but causes problems if I want to refactor a property name (e.g. if I want to rename observable from 'name' to 'firstName'.
If I do that renaming, the value persisted in 'name' will be lost.
Ideally to get around this, I would like to have the possibility to optionally define a storage key, something similar to this:
class SomeItem { @persist('MY_CUSTOM_KEY_THAT_DOES_NOT_CHANGE') @observable name = 'some' }
Is this possible to achieve?
The text was updated successfully, but these errors were encountered:
Hi,
In the example of readme, one can persist in this way:
class SomeItem { @persist @observable name = 'some' }
This is nice and straightforward, but causes problems if I want to refactor a property name (e.g. if I want to rename observable from 'name' to 'firstName'.
If I do that renaming, the value persisted in 'name' will be lost.
Ideally to get around this, I would like to have the possibility to optionally define a storage key, something similar to this:
class SomeItem { @persist('MY_CUSTOM_KEY_THAT_DOES_NOT_CHANGE') @observable name = 'some' }
Is this possible to achieve?
The text was updated successfully, but these errors were encountered: