Skip to content

Commit ef3b348

Browse files
committed
Merge pull request #2508 from jsfb/monitor-with-context
Start monitoring uses of withContext, related to issue #2112
2 parents 89aaf73 + 46bff98 commit ef3b348

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/ReactContext.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
var assign = require('Object.assign');
1515
var emptyObject = require('emptyObject');
16+
var monitorCodeUse = require('monitorCodeUse');
1617

1718
/**
1819
* Keeps track of the current context.
@@ -45,6 +46,8 @@ var ReactContext = {
4546
* @return {ReactComponent|array<ReactComponent>}
4647
*/
4748
withContext: function(newContext, scopedCallback) {
49+
monitorCodeUse('react_with_context', {newContext: newContext});
50+
4851
var result;
4952
var previousContext = ReactContext.current;
5053
ReactContext.current = assign({}, previousContext, newContext);

0 commit comments

Comments
 (0)