React Native: Setting the width of a view equal to its height when using percentages

Viewed 12379

I have this stylesheet, and I'm trying to make the width of this equal to the height when I set height as a percentage. I the following with no success:

art: {
    height: "70%",
    width: styles.podcastArt.height,
    marginRight:10,
    marginTop:10,
    marginBottom:10,
},

Any ideas or direction would be helpful. Thanks!

1 Answers

set aspectRatio: 1

art: {
    height: "70%",
    aspectRatio: 1,
    marginRight:10,
    marginTop:10,
    marginBottom:10,
},
Related