React Native flexible view sizing within a paged scrollview

I'm trying to use a ScrollView (with paging enabled) in React Native to page through a series of images. Anyone know how to make the image views fill each page of the scroll view? So far I've only had luck hard coding width and height values for the image style.

Here's roughly what I'm doing:

render: function() {
  return (
    var images = [{ url: 'http://url/to/image.jpg' }, { url: 'http://url/to/another-image.jpg'}];
    <ScrollView horizontal={true} pagingEnabled={true} style={styles.myScrollViewStyle}>
      {images.map(image => {
        return (
          <Image source={{uri: image.url}} style={styles.myImageStyle} />
        );
      })}
    </ScrollView>
  );
}

The only way images show up is if I hardcode a width/height number in the style. I've been unable to get the Image to just flex to fill 1 whole page.

ScrollView style:

scrollView: {
  flex: 1,
  backgroundColor: '#000000',
}

Image style:

image: {
  width:375,
  height:667,
  flex: 1,
  backgroundColor: 'rgba(0,0,0,0)',
}

To set image dimensions use next code:

var Dimensions = require('Dimensions');
var windowSize = Dimensions.get('window');

...

image: {
  width: windowSize.width,
  height: windowSize.height,
  flex: 1,
  backgroundColor: 'rgba(0,0,0,0)',
}

I do not believe it is possible to achieve this using only Flex right now, as it is going to try to contain all the images within your container.

ScrollView does have a contentContainerStyle={} property however, so I could envision a solution being something like setting the width of the container to be (window.width * number of items) which would then allow flex:1 on each image child do what you expect.

Unfortunately there is currently no way to fetch the window width (yet) https://github.com/facebook/react-native/pull/418

At the moment it seems like hard coding dimensions is the only option.