I am working on a react-native project and we are putting images currently in /images/ folder. Is it a good path for them ? Is there any best practice?
In image assets folder, create index.js file and put following:
const images = {
main_bg: require('./background.png'),
main_logo: require('./auth/home_title.png'),
///you can add more many images like this here.
};
module.exports = images;
When using the images, you can do like this:
import Images from '../../assets/index'; ...