0

Below is an example of putting an image in the data. How can I put <UserSvgIcon/>? I have a SVG component and want to use it in stead of the image in the example. I'm new to RN.

Let me explain more. I have import UserSvgIcon from './Svgicons/UserSvgIcon'; I have UserSvgIcon.js in a folder. When I show the svg, I use <UserSvgIcon/>. So, I want to show this svg (not the image as below) in the data.

DataList = [
  { ..., image: require('../../assets/images/user.png') }
]

Render function

<FlatList
   data={DataList}
   renderItem={({ item, index }) => {
     <Image source={item.image} />
   }                
/>
Boon
  • 11
  • 3

0 Answers0