How to pass React Props inside Css??
I want to change the css background-image url passing react props
3 Replies
inside of the component you can use inline styling, but this can be a bit messy and restrictive also.
so you can either
or what I like to do is
the other alternative is to use some form of JS based CSS library such as styled components
Ooooh @Coder_Carl thx 😊
np.
the 2nd example allow you to pass standard html props through on the Component and it will be added to the div wrapper