redux-storage
Advanced tools
Comparing version 1.1.6 to 1.2.0
@@ -14,3 +14,6 @@ 'use strict'; | ||
}; | ||
engine.load().then(dispatchLoad); | ||
return engine.load().then(function (newState) { | ||
dispatchLoad(newState); | ||
return newState; | ||
}); | ||
}; | ||
@@ -17,0 +20,0 @@ }; |
{ | ||
"name": "redux-storage", | ||
"version": "1.1.6", | ||
"version": "1.2.0", | ||
"description": "Persistence layer for redux with flexible backends", | ||
@@ -32,11 +32,11 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"babel": "^5.8.21", | ||
"babel-core": "^5.8.22", | ||
"babel-eslint": "^4.1.0", | ||
"babel": "^5.8.23", | ||
"babel-core": "^5.8.23", | ||
"babel-eslint": "^4.1.1", | ||
"chai": "^3.2.0", | ||
"chai-as-promised": "^5.1.0", | ||
"eslint": "^1.2.1", | ||
"eslint": "^1.3.1", | ||
"eslint-config-airbnb": "0.0.8", | ||
"eslint-plugin-react": "^3.3.0", | ||
"mocha": "^2.2.5", | ||
"eslint-plugin-react": "^3.3.1", | ||
"mocha": "^2.3.0", | ||
"sinon": "^1.16.1" | ||
@@ -43,0 +43,0 @@ }, |
@@ -74,2 +74,8 @@ [redux-storage][] | ||
load(store); | ||
// Notice that our load function will return a promise that can also be used | ||
// to respond to the restore event. | ||
load(store) | ||
.then((newState) => console.log('Loaded state:', newState)) | ||
.catch(() => console.log('Failed to load previous state')); | ||
``` | ||
@@ -76,0 +82,0 @@ |
19479
235
205