Answers for "how to change background image dynamically in react"

0

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>
  )
}
Posted by: Guest on February-05-2021

Code answers related to "how to change background image dynamically in react"

Code answers related to "Javascript"

Browse Popular Code Answers by Language