Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: Failed prop type: Invalid props.style key 'resizeMode' supplied to 'RCTView'

I'm using react-native-elements and I'm getting two same warnings, one for View and one for RCTView.

When I replace the Tile with something else (just a simple view) its fine.

The warnings are as below:

Warning: Failed prop type: Invalid props.style key 'resizeMode' supplied to 'RCTView'

Warning: Failed prop type: Invalid props.style key 'resizeMode' supplied to 'View'

This is the problematic code:

 return (

  <ScrollView>
    {events.map((event) => (
    <Tile
     key={event.event_id}
        imageSrc={{ uri: event.picture.large }}
        title={`${event.title.toUpperCase()}`}
        onPress={() => this.onLearnMoreEvent(event)}
        contentContainerStyle={{height: 80}}
      >
        <View style={{flex: 1, flexDirection: 'row', justifyContent: 'space-between'}}>
          <Text>{`${event.location.city}, ${event.start_date} `}</Text>
          <Text>Music</Text>
        </View>
      </Tile>

        ))}


  </ScrollView>
);
like image 882
Doron Goldberg Avatar asked Oct 31 '25 00:10

Doron Goldberg


1 Answers

Solution found:

Edit

node_modules/react-native-elements/src/tile/Tile.js

Delete

resizeMode: 'cover'

from:

  imageContainer: {
      alignItems: 'center',
      justifyContent: 'center',
      resizeMode: 'cover',
      backgroundColor: '#ffffff',
      flex: 2,
    },
like image 165
Doron Goldberg Avatar answered Nov 01 '25 13:11

Doron Goldberg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!