Skip to content

Commit 4cc5b9b

Browse files
committed
Send new lifted state on hot-reloading
Related to #48.
1 parent 6c76253 commit 4cc5b9b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/browser/extension/inject/pageScript.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ window.devToolsExtension = function(config = {}) {
111111

112112
function monitorReducer(state = {}, action) {
113113
lastAction = action.type;
114+
if (lastAction === '@@redux/INIT' && store.liftedStore) {
115+
// Send new lifted state on hot-reloading
116+
setTimeout(() => {
117+
relay('STATE', store.liftedStore.getState());
118+
}, 0);
119+
}
114120
return state;
115121
}
116122

0 commit comments

Comments
 (0)