For local icon image files like this:
icon.png
icon@2x.png
icon@3x.png
And normal usage code in RN Native:
<Image source={require('./assets/icon.png')} />
RN Native will automatically choose a best size for the current device through pixel ratio.
But on the web, the code require('./assets/icon.png') will load the @1x file, it makes the icon be blurred on high resolution screens like Apple retina-display or almost all of smart phones today.
Maybe a better default action is to load the @2x file (should be a webpack job?), this choice will solve the problem and it load less size of files on network than to load both @1x and @2x.
Hope RN-Web to be more easy to use 🙂
For local icon image files like this:
And normal usage code in RN Native:
RN Native will automatically choose a best size for the current device through pixel ratio.
But on the web, the code
require('./assets/icon.png')will load the @1x file, it makes the icon be blurred on high resolution screens like Apple retina-display or almost all of smart phones today.Maybe a better default action is to load the @2x file (should be a webpack job?), this choice will solve the problem and it load less size of files on network than to load both @1x and @2x.
Hope RN-Web to be more easy to use 🙂