I am new to react, I have been trying to implement parallax effect I have currently defined -
<section className="section parallax backgroundImageProp"></section>
and I am using the css to provide the background Image -
.backgroundImageProp::after{
background-image: url('https://republic-prod.azureedge.net/republic-prod/stories/promolarge/xxhdpi/15207762165aa53418177b5.jpeg');
background-repeat: no-repeat;
}
Currently the image is hardcoded I want it to be rendered dynamically, but I am unable to do so after multiple attempts, I am using the below style to add the css -
var backgroundImageAfter = {
after:{backgroundImage:'url(' + image_url + ')'},
};
<section className="section parallax" style={backgroundImageAfter}>
</section>
but this also did not help. I am missing something here. Please help.