Im actually writing a code in React native but while using react-icon I still don't know how to import an icon on my project. I've tried with components such as Image but I don't see them on my Screen.
Please help me, below I share the code:
import { StyleSheet,Image, View, } from 'react-native';
import { AiOutlineHome } from 'react-icons/ai';
export function Navbar() {
return (
<View style={style.nav}>
<Image
style={style.navIcon}
source={<AiOutlineHome/>}
/>
</View>
)
}
const style = StyleSheet.create({
nav:{
width:'100%',
height:50,
position:'absolute',
top:702,
},
navIcon:{
color:'red',
resize:'cover'
}
})
<View style={style.nav}><AiOutlineHome /></View>
?path
must be a function'