mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
BridgelessUIManager: Improve error message for getViewManagerConfig() (#41998)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41998 Now the error message propts people to turn on the interop layer. And, it adds more details to the suggestion to use hasViewManager(viewManagerName). Changelog: [Internal] Reviewed By: cortinico Differential Revision: D52002909 fbshipit-source-id: 80ea60b4f6a5fe15d773bb1f3f41de5ce43d6652
This commit is contained in:
1 parent
d825e7a5d4
commit
9670bde5ab
1 file changed
+2
-2
@@ -182,8 +182,8 @@ const UIManagerJS: UIManagerJSInterface & {[string]: any} = {
|
||||
return getUIManagerConstantsCache()[viewManagerName];
|
||||
} else {
|
||||
raiseSoftError(
|
||||
'getViewManagerConfig',
|
||||
`Use hasViewManagerConfig instead. viewManagerName: ${viewManagerName}`,
|
||||
`getViewManagerConfig('${viewManagerName}')`,
|
||||
`If '${viewManagerName}' has a ViewManager and you want to retrieve its native ViewConfig, please turn on the native ViewConfig interop layer. If you want to see if this component is registered with React Native, please call hasViewManagerConfig('${viewManagerName}') instead.`,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user