chore: Update example to React Native 0.61.5. (#639)

This also upgrades all the dependencies.
This commit is contained in:
Dylan Vann
2020-03-01 15:58:28 -05:00
committed by GitHub
parent e94e6fee66
commit 6994606073
40 changed files with 2736 additions and 2555 deletions
@@ -20,11 +20,15 @@ class AutoSizingImage extends Component {
nativeEvent: { width, height },
} = e
this.setState({ width, height })
if (this.props.onLoad) this.props.onLoad(e)
if (this.props.onLoad) {
this.props.onLoad(e)
}
}
getHeight = () => {
if (!this.state.height) return this.props.defaultHeight
if (!this.state.height) {
return this.props.defaultHeight
}
const ratio = this.state.height / this.state.width
const height = this.props.width * ratio
return height