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;