Upsell dev tools
People probably don't know these exist. Add some information about React dev mode as well as a link to the developer tools when using Chrome.
Pete Hunt committed
Jan 10, 2014 at 20:16 UTC
d8a8f6a88109e1ccdee02236909cbab101222185
1 file changed
+11
src/core/React.js
+11
@@ -68,6 +68,17 @@ var React = {
68
}
69
};
70
71
+if (__DEV__) {
72
+ var ExecutionEnvironment = require('ExecutionEnvironment');
73
+ if (ExecutionEnvironment.canUseDOM &&
74
+ navigator.userAgent.indexOf('Chrome') > -1) {
75
+ console.debug(
76
+ 'Download the React DevTools for a better development experience: ' +
77
+ 'http://fb.me/react-devtools'
78
+ );
79
+ }
80
+}
81
+
82
// Version exists only in the open-source version of React, not in Facebook's
83
// internal version.
84
React.version = '0.9.0-alpha';