Skip to content

Instantly share code, notes, and snippets.

@nanlabsweb
Created March 19, 2018 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanlabsweb/033da62f6e83a116ad7d4fd429dd5467 to your computer and use it in GitHub Desktop.
Save nanlabsweb/033da62f6e83a116ad7d4fd429dd5467 to your computer and use it in GitHub Desktop.
componentWillMount(){
if (this.props.source.uri){
Image.getSize(this.props.source.uri, (width, height) => {
this.setImageSize(width, height);
});
} else {
let {width, height} = resolveAssetSource(this.props.source);
this.setImageSize(width, height);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment