I want to add a background image in React.js using a style definition that works:
let imgUrl = 'images/berlin.jpg' let styles = { root: { backgroundImage: 'url(' + imgUrl + ')', overflow: 'hidden', }, ...

As you can see, the image repeats in the x direction. So I wanted to expand it:
let imgUrl = 'images/berlin.jpg' let styles = { root: { backgroundImage: 'url(' + imgUrl + ')', backgroundImage: { flex: 1, resizeMode: 'cover', // or 'stretch' }, overflow: 'hidden', }, ...
But the image no longer loads:

So how to set background image and adjust it in React.js?
source share