@samitouri / QOS-React-2 / commits / d42b285b0c

Monitoring code use of cloneWithProps

Jim committed Nov 26, 2014 at 16:29 UTC d42b285b0c99c96f0ba9612eee7e6dec2a727c23
1 file changed +2
src/utils/cloneWithProps.js
+2
@@ -16,6 +16,7 @@ var ReactElement = require('ReactElement');
16 var ReactPropTransferer = require('ReactPropTransferer');
17
18 var keyOf = require('keyOf');
19 +var monitorCodeUse = require('monitorCodeUse');
20 var warning = require('warning');
21
22 var CHILDREN_PROP = keyOf({children: null});
@@ -30,6 +31,7 @@ var CHILDREN_PROP = keyOf({children: null});
31 * @return {object} a clone of child with props merged in.
32 */
33 function cloneWithProps(child, props) {
34 + monitorCodeUse('react_clone_with_props');
35 if (__DEV__) {
36 warning(
37 !child.ref,