reactxp-starter icon indicating copy to clipboard operation
reactxp-starter copied to clipboard

File-loader loads pictures on the Web in a compatible way with react native

Open teebot opened this issue 7 years ago • 1 comments

Also serving index.html from dist makes it easier to serve anything relative to the dist directory (such as images)

teebot avatar May 12 '17 09:05 teebot

With this PR, loading local pictures with require will work both on native and web. Eg:

<RX.Image
    source={require('../static/losange.png')}
    style={{width: 50, height: 50}}
/>

After using the CLI it's the first thing I did to make it work but maybe I missed something obvious :)

teebot avatar May 12 '17 09:05 teebot