mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
69d1ed731b
Summary: **This is a manual React sync to replace Haste names with paths so that the removal of Haste is not blocked on a normal React sync. This is a one-time special case; in the future, React will generate renderers that use paths instead of Haste.** This commit uses the same base commit of React that's currently in RN (React ec6691a68716bc59291746fc62f374a56fb435c9) plus a commit in the React repo that removes Haste-style imports from the renderer (61f62246c8cfb76a4a19d1661eeaa5822ec37b36) and a commit to make the shims import from `implementations` (https://github.com/facebook/react/pull/15786). I built React in the React repo with `yarn build` and copied over the `oss` directory into one called `implementations` and removed the `*.fb.js` files. ## Changelog [General] [Changed] - Sync React with Haste-style imports rewritten to use path-based imports instead Pull Request resolved: https://github.com/facebook/react-native/pull/25100 Reviewed By: yungsters Differential Revision: D15575646 Pulled By: cpojer fbshipit-source-id: adf25f9826b71729043b65ba1afd20d14d8c19c4
35 lines
938 B
JavaScript
35 lines
938 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow strict-local
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import {ReactNativeViewConfigRegistry} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface';
|
|
|
|
import type {ViewConfigGetter} from './ReactNativeTypes';
|
|
|
|
const {register} = ReactNativeViewConfigRegistry;
|
|
|
|
/**
|
|
* Creates a renderable ReactNative host component.
|
|
* Use this method for view configs that are loaded from UIManager.
|
|
* Use createReactNativeComponentClass() for view configs defined within JavaScript.
|
|
*
|
|
* @param {string} config iOS View configuration.
|
|
* @private
|
|
*/
|
|
const createReactNativeComponentClass = function(
|
|
name: string,
|
|
callback: ViewConfigGetter,
|
|
): string {
|
|
return register(name, callback);
|
|
};
|
|
|
|
module.exports = createReactNativeComponentClass;
|