React Native Image Component
App.js:
import React from 'react';
import { View, StyleSheet, Text, Image } from 'react-native';
const App=()=>{
return(
<View>
<Text style={{fontSize:30, backgroundColor:'blue', color:'white'}}>Image Component in React Native</Text>
<Image source={{uri:'https://images.unsplash.com/photo-1674582221299-3a930cbda1db?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=435&q=80', width:500, height:200}} />
<Image source={require('./src/assets/images/sky.webp')}/>
</View>
)
}
export default App;
Comments
Post a Comment