(type)
| 2373 | } |
| 2374 | var didWarnAboutDeprecatedCreateFactory = false; |
| 2375 | function createFactoryWithValidation(type) { |
| 2376 | var validatedFactory = createElementWithValidation.bind(null, type); |
| 2377 | validatedFactory.type = type; |
| 2378 | |
| 2379 | { |
| 2380 | if (!didWarnAboutDeprecatedCreateFactory) { |
| 2381 | didWarnAboutDeprecatedCreateFactory = true; |
| 2382 | |
| 2383 | warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.'); |
| 2384 | } // Legacy hook: remove it |
| 2385 | |
| 2386 | |
| 2387 | Object.defineProperty(validatedFactory, 'type', { |
| 2388 | enumerable: false, |
| 2389 | get: function () { |
| 2390 | warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); |
| 2391 | |
| 2392 | Object.defineProperty(this, 'type', { |
| 2393 | value: type |
| 2394 | }); |
| 2395 | return type; |
| 2396 | } |
| 2397 | }); |
| 2398 | } |
| 2399 | |
| 2400 | return validatedFactory; |
| 2401 | } |
| 2402 | function cloneElementWithValidation(element, props, children) { |
| 2403 | var newElement = cloneElement.apply(this, arguments); |
| 2404 |
nothing calls this directly
no test coverage detected
searching dependent graphs…