![]() If you need to scale the image dynamically (i.e. Note that image sources required this way include size (width, height) info for the Image. In order for this to work, the image name in require has to be known statically. Images can be distributed via npm packages.The bundler knows the image dimensions, no need to duplicate it in the code.Adding and changing images doesn't require app recompilation, you can refresh the simulator as you normally do.Only the images that are actually used will be packaged into your app.you don't have to worry about name collisions. Images live in the same folder as your JavaScript code. ![]() On Windows, you might need to restart the bundler if you add new images to your project. If there is no image matching the screen density, the closest best option will be selected. For example,, will be used on an iPhone 7, while will be used on an iPhone 7 Plus or a Nexus 5. the bundler will bundle and serve the image corresponding to device's screen density.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |