react native compress image code example

Example 1: onPress image react native

//use Touchable Opacity
<TouchableOpacity onPress={()=> alert('image clicked)}>
          <Image source={require('./sampleimage.png')} style = {styles.ImageClass} />
        </TouchableOpacity>

Example 2: react native sovrapporre immagini

<View>
    <Image
        source={yourImageUrl}
        resizeMode={'cover'}
        style={{
            width: 300,
            height: 300
        }}
    />

    <View style={{ position: 'absolute', top: 0, left: 0, right: 0, height: 300, alignItems: 'center', justifyContent: 'center' }}>
        <Text>Your overlay text</Text>
    </View>
</View>