@@ -60,17 +60,20 @@ Use this specification for our WebView Component:
6060<TabItem value =" typescript " >
6161
6262``` typescript title="Demo/specs/WebViewNativeComponent.ts"
63- import type {HostComponent , ViewProps } from ' react-native' ;
64- import type {BubblingEventHandler } from ' react-native/Libraries/Types/CodegenTypes' ;
65- import codegenNativeComponent from ' react-native/Libraries/Utilities/codegenNativeComponent' ;
63+ import type {
64+ CodegenTypes ,
65+ HostComponent ,
66+ ViewProps ,
67+ } from ' react-native' ;
68+ import {codegenNativeComponent } from ' react-native' ;
6669
6770type WebViewScriptLoadedEvent = {
6871 result: ' success' | ' error' ;
6972};
7073
7174export interface NativeProps extends ViewProps {
7275 sourceURL? : string ;
73- onScriptLoaded? : BubblingEventHandler <WebViewScriptLoadedEvent > | null ;
76+ onScriptLoaded? : CodegenTypes . BubblingEventHandler <WebViewScriptLoadedEvent > | null ;
7477}
7578
7679export default codegenNativeComponent <NativeProps >(
@@ -84,9 +87,8 @@ export default codegenNativeComponent<NativeProps>(
8487``` ts title="Demo/RCTWebView/js/RCTWebViewNativeComponent.js":
8588// @flow strict-local
8689
87- import type {HostComponent , ViewProps } from ' react-native' ;
88- import type {BubblingEventHandler } from ' react-native/Libraries/Types/CodegenTypes' ;
89- import codegenNativeComponent from ' react-native/Libraries/Utilities/codegenNativeComponent' ;
90+ import type {CodegenTypes , HostComponent , ViewProps } from ' react-native' ;
91+ import {codegenNativeComponent } from ' react-native' ;
9092
9193type WebViewScriptLoadedEvent = $ReadOnly <{|
9294 result: " success" | " error" ,
@@ -95,7 +97,7 @@ type WebViewScriptLoadedEvent = $ReadOnly<{|
9597type NativeProps = $ReadOnly <{|
9698 ... ViewProps ,
9799 sourceURL? : string ;
98- onScriptLoaded? : BubblingEventHandler <WebViewScriptLoadedEvent >? ;
100+ onScriptLoaded? : CodegenTypes . BubblingEventHandler <WebViewScriptLoadedEvent >? ;
99101| }>;
100102
101103export default (codegenNativeComponent <NativeProps >(
0 commit comments