Skip to content

Commit 494b73c

Browse files
tido64facebook-github-bot
authored andcommitted
fix: remove unactionable warning when on 'Paper' (#33830)
Summary: We are currently seeing warning `Native Component 'X' that calls codegenNativeComponent was not code generated at build time. Please check its definition.` even though we have not opted into Fabric. This warning is not actionable and is just noisy. See also discussion: reactwg/react-native-releases#21 (comment) ## Changelog [General] [Fixed] - Remove unactionable warning about `codegenNativeComponent` when on 'Paper' Pull Request resolved: #33830 Test Plan: n/a Reviewed By: dmitryrykun Differential Revision: D36377844 Pulled By: cortinico fbshipit-source-id: 23c9f9dbf0ce1cea60c5dc8caa02d0dc53bd635d
1 parent e3a0eea commit 494b73c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Libraries/Utilities/codegenNativeComponent.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,14 @@ function codegenNativeComponent<Props>(
3434
componentName: string,
3535
options?: Options,
3636
): NativeComponentType<Props> {
37-
const errorMessage =
38-
"Native Component '" +
39-
componentName +
40-
"' that calls codegenNativeComponent was not code generated at build time. Please check its definition.";
4137
if (global.RN$Bridgeless === true) {
38+
const errorMessage =
39+
"Native Component '" +
40+
componentName +
41+
"' that calls codegenNativeComponent was not code generated at build time. Please check its definition.";
4242
console.error(errorMessage);
43-
} else {
44-
console.warn(errorMessage);
4543
}
44+
4645
let componentNameInUse =
4746
options && options.paperComponentName != null
4847
? options.paperComponentName

0 commit comments

Comments
 (0)