@@ -757,49 +757,6 @@ export function createElement(type, config, children) {
757757  return  element ; 
758758} 
759759
760- let  didWarnAboutDeprecatedCreateFactory  =  false ; 
761- 
762- /** 
763-  * Return a function that produces ReactElements of a given type. 
764-  * See https://reactjs.org/docs/react-api.html#createfactory 
765-  */ 
766- export  function  createFactory ( type )  { 
767-   const  factory  =  createElement . bind ( null ,  type ) ; 
768-   // Expose the type on the factory and the prototype so that it can be 
769-   // easily accessed on elements. E.g. `<Foo />.type === Foo`. 
770-   // This should not be named `constructor` since this may not be the function 
771-   // that created the element, and it may not even be a constructor. 
772-   // Legacy hook: remove it 
773-   factory . type  =  type ; 
774- 
775-   if  ( __DEV__ )  { 
776-     if  ( ! didWarnAboutDeprecatedCreateFactory )  { 
777-       didWarnAboutDeprecatedCreateFactory  =  true ; 
778-       console . warn ( 
779-         'React.createFactory() is deprecated and will be removed in '  + 
780-           'a future major release. Consider using JSX '  + 
781-           'or use React.createElement() directly instead.' , 
782-       ) ; 
783-     } 
784-     // Legacy hook: remove it 
785-     Object . defineProperty ( factory ,  'type' ,  { 
786-       enumerable : false , 
787-       get : function  ( )  { 
788-         console . warn ( 
789-           'Factory.type is deprecated. Access the class directly '  + 
790-             'before passing it to createFactory.' , 
791-         ) ; 
792-         Object . defineProperty ( this ,  'type' ,  { 
793-           value : type , 
794-         } ) ; 
795-         return  type ; 
796-       } , 
797-     } ) ; 
798-   } 
799- 
800-   return  factory ; 
801- } 
802- 
803760export  function  cloneAndReplaceKey ( oldElement ,  newKey )  { 
804761  return  ReactElement ( 
805762    oldElement . type , 
0 commit comments