UNPKG

redux-storage

Version:

Persistence layer for redux with flexible backends

19 lines (16 loc) 465 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _actions = require('./actions'); exports['default'] = function (engine) { return function (store) { var dispatchLoad = function dispatchLoad(state) { return store.dispatch((0, _actions.load)(state)); }; return engine.load().then(function (newState) { dispatchLoad(newState); return newState; }); }; };