Update comments to getViewManagerConfig() function name

Summary: This change updates the comments and warning to match the function name.

Reviewed By: achen1

Differential Revision: D10345724

fbshipit-source-id: 05b1c60703da97ed083d7de492559bafb46ad813
This commit is contained in:
Albert Sun 2018-10-11 13:59:46 -07:00 committed by Facebook Github Bot
parent 6eeff75849
commit b4a532e1d1
2 changed files with 3 additions and 3 deletions

View File

@ -152,7 +152,7 @@ if (__DEV__) {
get: () => {
console.warn(
`Accessing view manager configs directly off UIManager via UIManager['${viewManagerName}'] ` +
`is no longer supported. Use UIManager.getViewManager('${viewManagerName}') instead.`,
`is no longer supported. Use UIManager.getViewManagerConfig('${viewManagerName}') instead.`,
);
return UIManager.getViewManagerConfig(viewManagerName);
},

View File

@ -14,11 +14,11 @@
*
* In an effort to improve startup performance by lazily loading view managers,
* the interface to access view managers will change from
* UIManager['viewManagerName'] to UIManager.getViewManager('viewManagerName').
* UIManager['viewManagerName'] to UIManager.getViewManagerConfig('viewManagerName').
* By using a function call instead of a property access, the UIManager will
* be able to initialize and load the required view manager from native
* synchronously. All of React Native's core components have been updated to
* use getViewManager(). For the next few releases, any usage of
* use getViewManagerConfig(). For the next few releases, any usage of
* UIManager['viewManagerName'] will result in a warning. Because React Native
* does not support Proxy objects, a view manager access is implied if any of
* UIManager's properties that are not one of the properties below is being