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

This commit is contained in:
Daniel Friesen
2015-06-22 12:04:29 -07:00
parent c8d606196d
commit 357ed8ebd7
+3
View File
@@ -30,6 +30,9 @@ function deprecated(fnName, newModule, ctx, fn) {
var newFn = function() {
warning(
warned,
// Require examples in this string must be split to prevent React's
// build tools from mistaking them for real requires.
// Otherwise the build tools will attempt to build a '%s' module.
'`require' + '("react").%s` is deprecated. Please use `require' + '("%s").%s` ' +
'instead.',
fnName,