MCPcopy Index your code
hub / github.com/plotly/dash / createFactoryWithValidation

Function createFactoryWithValidation

dash/deps/react@18.2.0.js:2375–2401  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

warnFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…