Skip to content

Commit 9228812

Browse files
authored
Support ^@@redux/REPLACE last action for hot reload (#533)
* Bump redux-devtools-instrument to v1.9 * Support ^@@redux/REPLACE for isHotReloaded
1 parent 0f5bac0 commit 9228812

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
"react-json-tree": "^0.10.9",
8181
"react-redux": "^4.4.5",
8282
"redux": "^3.5.2",
83-
"redux-devtools": "^3.4.0",
84-
"redux-devtools-instrument": "^1.8.3",
83+
"redux-devtools": "^3.4.1",
84+
"redux-devtools-instrument": "^1.9.0",
8585
"remotedev-app": "^0.10.8",
8686
"remotedev-monitor-components": "^0.0.5",
8787
"remotedev-serialize": "^0.1.1",

src/app/service/Monitor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default class Monitor {
2323
this.active = false;
2424
clearTimeout(this.waitingTimeout);
2525
};
26-
isHotReloaded = () => this.lastAction.indexOf('@@redux/INIT') === 0;
26+
isHotReloaded = () => this.lastAction && /^@@redux\/(INIT|REPLACE)/.test(this.lastAction);
2727
isMonitorAction = () => this.lastAction && this.lastAction !== 'PERFORM_ACTION';
2828
isTimeTraveling = () => this.lastAction === 'JUMP_TO_STATE';
2929
isPaused = () => {

yarn.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6360,9 +6360,9 @@ redux-devtools-chart-monitor@^1.6.1:
63606360
react-pure-render "^1.0.2"
63616361
redux-devtools-themes "^1.0.0"
63626362

6363-
redux-devtools-instrument@^1.0.1, redux-devtools-instrument@^1.8.3:
6364-
version "1.8.3"
6365-
resolved "https://registry.yarnpkg.com/redux-devtools-instrument/-/redux-devtools-instrument-1.8.3.tgz#c510d67ab4e5e4525acd6e410c25ab46b85aca7c"
6363+
redux-devtools-instrument@^1.0.1, redux-devtools-instrument@^1.9.0:
6364+
version "1.9.0"
6365+
resolved "https://registry.yarnpkg.com/redux-devtools-instrument/-/redux-devtools-instrument-1.9.0.tgz#2faed9ac3292c783284b21843edfaa0567764a0c"
63666366
dependencies:
63676367
lodash "^4.2.0"
63686368
symbol-observable "^1.0.2"
@@ -6394,9 +6394,9 @@ redux-devtools-themes@^1.0.0:
63946394
dependencies:
63956395
base16 "^1.0.0"
63966396

6397-
redux-devtools@^3.0.0, redux-devtools@^3.4.0:
6398-
version "3.4.0"
6399-
resolved "https://registry.yarnpkg.com/redux-devtools/-/redux-devtools-3.4.0.tgz#9bf8415154301f56906f26a36f5bc1f5ca913bb5"
6397+
redux-devtools@^3.0.0, redux-devtools@^3.4.1:
6398+
version "3.4.1"
6399+
resolved "https://registry.yarnpkg.com/redux-devtools/-/redux-devtools-3.4.1.tgz#09d342ce0ab6087be679e953a1d7c530efa1138e"
64006400
dependencies:
64016401
lodash "^4.2.0"
64026402
prop-types "^15.5.7"

0 commit comments

Comments
 (0)