React how to change background image code example
Example: how to change background image dynamically in react
render: function() {
var divImage = {
backgroundImage : "url(" + this.state.song.imgSrc + "),url(" + this.state.nextImgSrc + ");"
};
return (
<li>
<div ref="image-pane" className="player" style={divImage}></div>
</li>
)
}