1. /**
    
  2.  * Copyright (c) Meta Platforms, Inc. and affiliates.
    
  3.  *
    
  4.  * This source code is licensed under the MIT license found in the
    
  5.  * LICENSE file in the root directory of this source tree.
    
  6.  *
    
  7.  * @format
    
  8.  * @flow strict-local
    
  9.  */
    
  10. 
    
  11. 'use strict';
    
  12. 
    
  13. import {ReactNativeViewConfigRegistry} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface';
    
  14. import {type ViewConfig} from './ReactNativeTypes';
    
  15. 
    
  16. const {register} = ReactNativeViewConfigRegistry;
    
  17. 
    
  18. /**
    
  19.  * Creates a renderable ReactNative host component.
    
  20.  * Use this method for view configs that are loaded from UIManager.
    
  21.  * Use createReactNativeComponentClass() for view configs defined within JavaScript.
    
  22.  *
    
  23.  * @param {string} config iOS View configuration.
    
  24.  * @private
    
  25.  */
    
  26. const createReactNativeComponentClass = function (
    
  27.   name: string,
    
  28.   callback: () => ViewConfig,
    
  29. ): string {
    
  30.   return register(name, callback);
    
  31. };
    
  32. 
    
  33. module.exports = createReactNativeComponentClass;