javascript - create-react-app won't load local images dynamically -


i trying dynamically load multiple images create-react-app. not able see images on page. see. this see when checking pagehere code.

gallery.js

export default [  './images/urban_pocket_park.jpg',  './images/urban_pocket_park(2).jpg',  './images/urban_pocket_park(3).jpg',  './images/urban_pocket_park(4).jpg',  './images/urban_pocket_park(5).jpg',  './images/urban_pocket_park(6).jpg' ] 

urbaninfo.js

import gallery './gallery'  const urbaninfo = (props) => {   const images = gallery.map(function(image, idx) {   return (    <image key={idx} src={image} />   )  });   return (     <div>       {images}     </div>  ) } export default urbaninfo; 

help appreciated. have checked path of images , work fine.


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -