michaelcontento / redux-storage

Persistence layer for redux with flexible backends
MIT License
675 stars 50 forks source link

How do you deal with app updates? #157

Closed kevando closed 8 years ago

kevando commented 8 years ago

I am rather new to app development, but I keep running into issues when beta testers update the app. I change the state tree quite heavily - which is causing most of the problems.

a) Is there a better approach to that? b) Where would you place a check to run engine.save({}) if the app is updated?

michaelcontento commented 8 years ago

Hi,

changing the state tree on every update will always cause some trouble. The best solution would be to minimize such changes and use data structures / layouts that allow future changes without breaking on the very first change.

Beside that, redux-storage-decorator-migrate might be a good companion for you. Also your reducers could handle the LOAD / SAVE and transform / update accordingly.

Feel free to re-open this issue if questions are left open!

kevando commented 8 years ago

Thanks @michaelcontento I will check that out migrate package. That closes this question, but I do have one more thing I'm trying out.

Do you know if Redux ORM will work with your redux-storage?

michaelcontento commented 8 years ago

I haven't tested redux-storage with redux-orm as your post is the first thing I hear about redux-orm 😂

But I builds on top of redux and as long as it follows the api / design / contract of redux (which it does - as far as I can tell after a quick look) redux-orm and redux-storage should play together nicely 😃