Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unactionable warning when on 'Paper' #33830

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Libraries/Utilities/codegenNativeComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ function codegenNativeComponent<Props>(
componentName: string,
options?: Options,
): NativeComponentType<Props> {
const errorMessage =
"Native Component '" +
componentName +
"' that calls codegenNativeComponent was not code generated at build time. Please check its definition.";
if (global.RN$Bridgeless === true) {
const errorMessage =
"Native Component '" +
componentName +
"' that calls codegenNativeComponent was not code generated at build time. Please check its definition.";
Comment on lines +38 to +41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sending this over @tido64
I'm unsure this is the correct fix. Let me loop this internally.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like safe to land. @fortmarek we should cherry-pick this for the next RC 👍

console.error(errorMessage);
} else {
console.warn(errorMessage);
}

let componentNameInUse =
options && options.paperComponentName != null
? options.paperComponentName
Expand Down