| 1489 | replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] |
| 1490 | }; |
| 1491 | var defineDeprecationWarning = function defineDeprecationWarning(methodName, info) { |
| 1492 | Object.defineProperty(ReactComponent.prototype, methodName, { |
| 1493 | get: function get() { |
| 1494 | lowPriorityWarning_1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); |
| 1495 | return undefined; |
| 1496 | } |
| 1497 | }); |
| 1498 | }; |
| 1499 | for (var fnName in deprecatedAPIs) { |
| 1500 | if (deprecatedAPIs.hasOwnProperty(fnName)) { |
| 1501 | defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); |