Files
DefinitelyTyped/types/react-native
Danny Cochran 15f1ae0ccb update react-native image source typing
When requiring in an image path (require('./path/to/image.png')), the require resolves to a number.

This number can be passed directly into the image source, e.g:

```javascript
const imageId = require('./path/to/image.png');
return <Image source={imageId} />;
```

I'm not sure if this has official documentation anywhere but this is how I've been rendering images for some time:

https://facebook.github.io/react-native/docs/image.html#source
2017-08-16 16:25:39 -07:00
..