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

Framework: implement redux persistence for state/ui #2971

Closed
4 tasks
gwwar opened this issue Feb 1, 2016 · 1 comment
Closed
4 tasks

Framework: implement redux persistence for state/ui #2971

gwwar opened this issue Feb 1, 2016 · 1 comment

Comments

@gwwar
Copy link
Contributor

gwwar commented Feb 1, 2016

Implement persistence for state/ui:

  • You'll need to create a schema to represent what valid state looks like
  • handle SERIALIZE action in reducer to return a plain js object to persist
  • handle DESERIALIZE action in reducer. If state is valid, return state and initialize with immutable js if needed. If data is invalid, return the default initial state.
return isValidStateWithSchema( state, schema ) ? state : defaultState;
  • Tests for serialize, deserialize, and invalid data cases

See: #2754

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