I\'m currently building a test app using React Native. The Image module, thus far has been working fine.
For example, if I had an image named avatar
, th
If you're looking for a way to create a list by looping through a JSON array of your images and descriptions for example, this will work for you.
const Profiles=[
{
"id" : "1",
"name" : "Peter Parker",
"src" : require('../images/user1.png'),
"age":"70",
},
{
"id" : "2",
"name" : "Barack Obama",
"src" : require('../images/user2.png'),
"age":"19",
},
{
"id" : "3",
"name" : "Hilary Clinton",
"src" : require('../images/user3.png'),
"age":"50",
}
]
export default Profiles;
import Profiles from './ProfilesDB.js';
item.id}
renderItem={({item}) => (
{item.name}
)}
/>
Good luck!