File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 12
12
"use strict" ;
13
13
14
14
var assign = require ( 'Object.assign' ) ;
15
+ var monitorCodeUse = require ( 'monitorCodeUse' ) ;
15
16
16
17
/**
17
18
* Keeps track of the current context.
@@ -28,6 +29,9 @@ var ReactContext = {
28
29
current : { } ,
29
30
30
31
/**
32
+ *
33
+ * @deprecated
34
+ *
31
35
* Temporarily extends the current context while executing scopedCallback.
32
36
*
33
37
* A typical use case might look like
@@ -44,6 +48,11 @@ var ReactContext = {
44
48
* @return {ReactComponent|array<ReactComponent> }
45
49
*/
46
50
withContext : function ( newContext , scopedCallback ) {
51
+
52
+ monitorCodeUse ( 'react_with_context' ,
53
+ { newContext : newContext , scopedCallback : scopedCallback }
54
+ ) ;
55
+
47
56
var result ;
48
57
var previousContext = ReactContext . current ;
49
58
ReactContext . current = assign ( { } , previousContext , newContext ) ;
You can’t perform that action at this time.
0 commit comments