Skip to content

Commit

Permalink
[skip ci] BridgelessUIManager: Improve error message for getViewManag…
Browse files Browse the repository at this point in the history
…erConfig() (#41998)

Summary:

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
  • Loading branch information
RSNara authored and facebook-github-bot committed Jan 10, 2024
1 parent a40c28c commit 1dd4365
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1dd4365

Please sign in to comment.