I was trying to get a full-width carousel, which wasn't that easy. This might be an improvement, as it assumes full width if no explicit width is set on the Carousel, and pulls that width through as appropriate if it is set.
The wrapping of the children means that they all have consistent width without the width having to be set explicitly. The only thing I don't like about this is creating another View node in the process.
This could be carried further by listening for orientation changes and then pushing the change in width down the component tree.
I was trying to get a full-width carousel, which wasn't that easy. This might be an improvement, as it assumes full width if no explicit width is set on the Carousel, and pulls that width through as appropriate if it is set.
The wrapping of the children means that they all have consistent width without the width having to be set explicitly. The only thing I don't like about this is creating another View node in the process.
This could be carried further by listening for orientation changes and then pushing the change in width down the component tree.