Skip to content

Instantly share code, notes, and snippets.

@OliverJAsh
Created March 7, 2018 14:28
Show Gist options
  • Save OliverJAsh/a47ad5ac2c7c0a695684de44635aa821 to your computer and use it in GitHub Desktop.
Save OliverJAsh/a47ad5ac2c7c0a695684de44635aa821 to your computer and use it in GitHub Desktop.
React v15: log and time stamp end of batch update
diff --git a/node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js b/node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js
index 5e149f0..96e34a0 100644
--- a/node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js
+++ b/node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js
@@ -20,6 +20,8 @@ var emptyFunction = require('fbjs/lib/emptyFunction');
var RESET_BATCHED_UPDATES = {
initialize: emptyFunction,
close: function () {
+ console.timeStamp('end React batch update');
+ console.log('end React batch update');
ReactDefaultBatchingStrategy.isBatchingUpdates = false;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment