Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

import img react in another file

//import imgs in a different js file
import lostImage from './assets/img/illustrations/lost.svg';
export { lostImage }; 

//import in the component to use it
import {lostImage} from './images.js'

 
PREVIOUS NEXT
Tagged: #import #img #react #file
ADD COMMENT
Topic
Name
3+8 =