From 29a90a4770f3bf59202e5d9aa4b890392353ae37 Mon Sep 17 00:00:00 2001 From: Daniel Bugl Date: Thu, 17 Sep 2015 19:04:22 +0200 Subject: [PATCH] tag recomputed actions I'm writing a store enhancer and had lots of bugs when working with devtools and my own store enhancer. This is the only way I could prevent recomputed actions from the devtools to mess with my store enhancer. I also tried including my store enhancer first and devtools first. Neither option worked fine. I hope this is a good way to handle these kinds of issues, if not, please let me know a different way to do this. --- src/devTools.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/devTools.js b/src/devTools.js index f57e9bc1..10747f75 100644 --- a/src/devTools.js +++ b/src/devTools.js @@ -60,6 +60,8 @@ function recomputeStates(reducer, committedState, stagedActions, skippedActions) for (let i = 0; i < stagedActions.length; i++) { const action = stagedActions[i]; + + if (i !== stagedActions.length - 1) action._recomputed = true; const previousEntry = computedStates[i - 1]; const previousState = previousEntry ? previousEntry.state : committedState;