Update AppRegistry.registerComponent's parameter.

Summary:
Update AppRegistry.registerComponent's second parameter name from "component" to "getComponentFunc".
Because the second parameter is NOT a component , it is like ` () => ReactClass<any>;`.

Using 'component' will mislead people who use this function.

- react-native 4.2 docs: [static registerComponent(appKey, getComponentFunc) ](http://facebook.github.io/react-native/releases/0.42/docs/appregistry.html#registercomponent)
- react-native 4.4 docs: [static registerComponent(appKey, component, section?) ](http://facebook.github.io/react-native/docs/appregistry.html#registercomponent)

No need to test. Update the parameter name will not mislead the people who use registerComponent.
Closes https://github.com/facebook/react-native/pull/13747

Differential Revision: D4994037

Pulled By: javache

fbshipit-source-id: 1609d6ff7d63bdc15d7e8e5a94cbf4e029ab427c
This commit is contained in:
周中原 2017-05-03 17:58:59 -07:00 committed by Facebook Github Bot
parent ef0bd5c71d
commit f5056f844d

View File

@ -109,14 +109,14 @@ const AppRegistry = {
registerComponent(
appKey: string,
component: ComponentProvider,
componentProvider: ComponentProvider,
section?: boolean,
): string {
runnables[appKey] = {
component,
componentProvider,
run: (appParameters) =>
renderApplication(
componentProviderInstrumentationHook(component),
componentProviderInstrumentationHook(componentProvider),
appParameters.initialProps,
appParameters.rootTag
)