Skip to content

Instantly share code, notes, and snippets.

@joeyfigaro
Last active June 16, 2017 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeyfigaro/bc30c0905370a20cd9c38e2c0148693e to your computer and use it in GitHub Desktop.
Save joeyfigaro/bc30c0905370a20cd9c38e2c0148693e to your computer and use it in GitHub Desktop.
Ramda & Redux (pick example)
store.subscribe(() => {
const state = store.getState();
storage.set('saved', pick(['lessons', 'auth', 'notifications'], state));
});
/*
{
saved: {
lessons: {...},
auth: {...},
notifications: [...]
}
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment