Skip to content

Instantly share code, notes, and snippets.

View shantp's full-sized avatar

Shant Parseghian shantp

  • Los Angeles, CA
View GitHub Profile
@shantp
shantp / persistState.js
Created February 29, 2016 23:46
persistState with async?
import mapValues from 'lodash/mapValues';
import identity from 'lodash/identity';
export default function persistState(sessionId, deserializeState = identity, deserializeAction = identity) {
if (!sessionId) {
return next => (...args) => next(...args);
}
function deserialize(state) {
return {