From d8a8f6a88109e1ccdee02236909cbab101222185 Mon Sep 17 00:00:00 2001 From: Pete Hunt Date: Fri, 10 Jan 2014 20:16:10 -0800 Subject: [PATCH] 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. --- src/core/React.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/core/React.js b/src/core/React.js index f82f4f787e..51114add0d 100644 --- a/src/core/React.js +++ b/src/core/React.js @@ -68,6 +68,17 @@ var React = { } }; +if (__DEV__) { + var ExecutionEnvironment = require('ExecutionEnvironment'); + if (ExecutionEnvironment.canUseDOM && + navigator.userAgent.indexOf('Chrome') > -1) { + console.debug( + 'Download the React DevTools for a better development experience: ' + + 'http://fb.me/react-devtools' + ); + } +} + // Version exists only in the open-source version of React, not in Facebook's // internal version. React.version = '0.9.0-alpha';