@@ -429,8 +429,8 @@ class CustomView extends React.Component {
429429class Welcome extends React . Component <
430430 ElementProps < View > & { color : string ; bgColor ?: null | undefined | string }
431431> {
432- rootViewRef = React . createRef < View > ( ) ;
433- customViewRef = React . createRef < CustomView > ( ) ;
432+ rootViewRef = React . createRef < React . ComponentRef < typeof View > > ( ) ;
433+ customViewRef = React . createRef < React . ComponentRef < typeof CustomView > > ( ) ;
434434
435435 testNativeMethods ( ) {
436436 if ( this . rootViewRef . current != null ) {
@@ -498,7 +498,7 @@ function TouchableTest() {
498498}
499499
500500export class TouchableHighlightTest extends React . Component {
501- buttonRef = React . createRef < React . ElementRef < typeof TouchableHighlight > > ( ) ;
501+ buttonRef = React . createRef < React . ComponentRef < typeof TouchableHighlight > > ( ) ;
502502
503503 render ( ) {
504504 return (
@@ -525,7 +525,7 @@ export class TouchableHighlightTest extends React.Component {
525525}
526526
527527export class TouchableOpacityTest extends React . Component {
528- buttonRef = React . createRef < React . ElementRef < typeof TouchableOpacity > > ( ) ;
528+ buttonRef = React . createRef < React . ComponentRef < typeof TouchableOpacity > > ( ) ;
529529
530530 render ( ) {
531531 return (
@@ -720,7 +720,7 @@ export class PressableTest extends React.Component<{}> {
720720}
721721
722722// App State
723- function appStateListener ( state : string ) {
723+ function appStateListener ( state ? : string ) {
724724 console . log ( 'New state: ' + state ) ;
725725}
726726
@@ -1575,7 +1575,7 @@ class BridgedComponentTest extends React.Component {
15751575}
15761576
15771577const SafeAreaViewTest = ( ) => {
1578- const viewRef = React . createRef < React . ElementRef < typeof View > > ( ) ;
1578+ const viewRef = React . createRef < React . ComponentRef < typeof View > > ( ) ;
15791579
15801580 return (
15811581 < >
@@ -1600,7 +1600,7 @@ const SafeAreaViewTest = () => {
16001600} ;
16011601
16021602const SwitchRefTest = ( ) => {
1603- const switchRef = React . createRef < React . ElementRef < typeof Switch > > ( ) ;
1603+ const switchRef = React . createRef < React . ComponentRef < typeof Switch > > ( ) ;
16041604
16051605 return (
16061606 < >
@@ -2103,7 +2103,7 @@ const AccessibilityCustomActionsTest = () => {
21032103
21042104// DrawerLayoutAndroidTest
21052105export class DrawerLayoutAndroidTest extends React . Component {
2106- drawerRef = React . createRef < DrawerLayoutAndroid > ( ) ;
2106+ drawerRef = React . createRef < React . ComponentRef < typeof DrawerLayoutAndroid > > ( ) ;
21072107
21082108 readonly styles = StyleSheet . create ( {
21092109 container : {
0 commit comments