@@ -15,7 +15,7 @@ import {
1515 Image ,
1616 StyleSheet ,
1717 Switch ,
18- TouchableHighlight ,
18+ Pressable ,
1919 Text ,
2020 TextInput ,
2121 View
@@ -92,14 +92,11 @@ class ItemComponent extends React.PureComponent<{
9292 const itemHash = Math . abs ( hashCode ( item . title ) ) ;
9393 const imgSource = THUMB_URLS [ itemHash % THUMB_URLS . length ] ;
9494 return (
95- < TouchableHighlight
96- onHideUnderlay = { this . props . onHideUnderlay }
95+ < Pressable
9796 onPress = { this . _onPress }
98- onShowUnderlay = { this . props . onShowUnderlay }
97+ onPressIn = { this . props . onShowUnderlay }
98+ onPressOut = { this . props . onHideUnderlay }
9999 style = { horizontal ? styles . horizItem : styles . item }
100- tvParallaxProperties = { {
101- pressMagnification : 1.1
102- } }
103100 >
104101 < View
105102 style = { [
@@ -116,7 +113,7 @@ class ItemComponent extends React.PureComponent<{
116113 { item . title } - { item . text }
117114 </ Text >
118115 </ View >
119- </ TouchableHighlight >
116+ </ Pressable >
120117 ) ;
121118 }
122119}
@@ -172,15 +169,11 @@ class Spindicator extends React.PureComponent<{}> {
172169 style = { [
173170 styles . spindicator ,
174171 {
175- transform : [
176- {
177- rotate : this . props . value . interpolate ( {
178- inputRange : [ 0 , 5000 ] ,
179- outputRange : [ '0deg' , '360deg' ] ,
180- extrapolate : 'extend'
181- } )
182- }
183- ]
172+ rotate : this . props . value . interpolate ( {
173+ inputRange : [ 0 , 5000 ] ,
174+ outputRange : [ '0deg' , '360deg' ] ,
175+ extrapolate : 'extend'
176+ } )
184177 }
185178 ] }
186179 />
@@ -263,9 +256,7 @@ class SingleColumnExample extends React.PureComponent {
263256 } ;
264257
265258 _onChangeScrollToIndex = ( text ) => {
266- this . _listRef
267- . getNode ( )
268- . scrollToIndex ( { viewPosition : 0.5 , index : Number ( text ) } ) ;
259+ this . _listRef . scrollToIndex ( { viewPosition : 0.5 , index : Number ( text ) } ) ;
269260 } ;
270261
271262 _scrollPos = new Animated . Value ( 0 ) ;
@@ -283,7 +274,7 @@ class SingleColumnExample extends React.PureComponent {
283274 ) ;
284275
285276 componentDidUpdate ( ) {
286- this . _listRef . getNode ( ) . recordInteraction ( ) ; // e.g. flipping logViewable switch
277+ this . _listRef . recordInteraction ( ) ; // e.g. flipping logViewable switch
287278 }
288279
289280 render ( ) {
@@ -398,7 +389,7 @@ class SingleColumnExample extends React.PureComponent {
398389 }
399390 } ;
400391 _pressItem = ( key : string ) => {
401- this . _listRef . getNode ( ) . recordInteraction ( ) ;
392+ this . _listRef . recordInteraction ( ) ;
402393 pressItem ( this , key ) ;
403394 } ;
404395 _listRef : AnimatedFlatList ;
@@ -469,7 +460,7 @@ const styles = StyleSheet.create({
469460 smallSwitch : {
470461 top : 1 ,
471462 margin : - 6 ,
472- transform : [ { scale : 0.7 } ]
463+ transform : ' scale( 0.7)'
473464 } ,
474465 stacked : {
475466 alignItems : 'center' ,
0 commit comments