Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add state schema field(s) #26

Open
dominictracey opened this issue Aug 27, 2017 · 2 comments
Open

Add state schema field(s) #26

dominictracey opened this issue Aug 27, 2017 · 2 comments

Comments

@dominictracey
Copy link
Owner

So when we change, we can default new values/upgrade old values, etc.

@dominictracey
Copy link
Owner Author

Probably need a broader strategy around state management, since we are using the snapshotting feature which may well end up causing performance issues.

There are five or so reducers at the moment, that all get combined by redux.

There is also the SessionState module utilized in the top-level AppView to restore the state after app restarts. I guess this does all the whole state. Does this mean that the whole state gets re-written whenever any item in any reducer gets updated? i.e. every second at a minimum. Perhaps we shouldn't keep seconds in redux but as a local state element?

In general, it would be nice to split the snapshotting out somewhat since parts of the state are read-only for all intents and purposes. Things like the board, set and programs sections of the session reducer. Certainly the history state will be largely static. We don't want to be constantly re-writing this data...

@dominictracey
Copy link
Owner Author

Now that we have moved to redux-persist instead of the homegrown solution included in the older pepperoni-app-kit there is a way forward maybe? We are using redux-persist-immutable, which is a drop-in replacement of redux-persist with immutable.js support and there are, as of this writing, some concerns that need resolution.

  1. We want to use redux-persist-migrate as part of the solution to this problem, it's not clear how that works with redux-persist-immutable. See (Handling updates to the format of the reducer that conflicts with local version rt2zz/redux-persist-immutable#28)
  2. More broadly, the entire redux-persist ecosystem seems to be undergoing breaking changes in moving from v4 (which we currently use) to v5. We should maybe table this discussion until that situation settles out.

I've commented in the appropriate redux-persist-immutable issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant