Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to dynamically show image from local storage in react native

// our data
// we need to require all images, 
// so that React Native knows about them statically
const items = [
    {
        id: '001',
        image: require('../images/001.jpeg'),
    },
    {
        id: '002',
        image: require('../images/002.jpeg'),
    },
];

// render
items.map( (item) => 
    <Image key={item.id} source={item.image} />
)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dynamically #show #image #local #storage #react #native
ADD COMMENT
Topic
Name
6+4 =