@samitouri / QOS-React-2 / commits / 357ed8ebd7

Add a comment about why the string is split up. For future readers of this file.

Daniel Friesen committed Jun 22, 2015 at 11:58 UTC 357ed8ebd7d890d14193962ced6c2fbcf563cec2
1 file changed +3
src/shared/utils/deprecated.js
+3
@@ -30,6 +30,9 @@ function deprecated(fnName, newModule, ctx, fn) {
30 var newFn = function() {
31 warning(
32 warned,
33 + // Require examples in this string must be split to prevent React's
34 + // build tools from mistaking them for real requires.
35 + // Otherwise the build tools will attempt to build a '%s' module.
36 '`require' + '("react").%s` is deprecated. Please use `require' + '("%s").%s` ' +
37 'instead.',
38 fnName,