From 1e5af7b526c69fc5050b40fb92210b41f6669b54 Mon Sep 17 00:00:00 2001 From: Krzysztof Moch Date: Wed, 3 Apr 2024 20:51:26 +0200 Subject: [PATCH] chore: disable codegen (#3647) We can not use Interop Layer with codegen - to be reverted once we integrate new architecture --- package.json | 7 +------ src/specs/VideoNativeComponent.ts | 5 ++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index f1386d62..524ccb65 100644 --- a/package.json +++ b/package.json @@ -64,10 +64,5 @@ "!**/*.tsbuildinfo", "!docs", "!examples" - ], - "codegenConfig": { - "name": "RNCVideo", - "type": "components", - "jsSrcsDir": "./src/specs" - } + ] } diff --git a/src/specs/VideoNativeComponent.ts b/src/specs/VideoNativeComponent.ts index 58d8ed63..11752957 100644 --- a/src/specs/VideoNativeComponent.ts +++ b/src/specs/VideoNativeComponent.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/ban-types */ import type {HostComponent, ViewProps} from 'react-native'; -import {NativeModules} from 'react-native'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +import {NativeModules, requireNativeComponent} from 'react-native'; import type { DirectEventHandler, Double, @@ -382,6 +381,6 @@ export const VideoManager = NativeModules.VideoManager as VideoManagerType; export const VideoDecoderProperties = NativeModules.VideoDecoderProperties as VideoDecoderPropertiesType; -export default codegenNativeComponent( +export default requireNativeComponent( 'RCTVideo', ) as VideoComponentType;