Reputation: 7022
I have a ReactJS render function that generates a html element with a style. However, the produced HTML doesn't contain this style. What am I doing wrong?
<a href="javascript:void(0);"
className={cx('img','box','med','no_img','photo','act')}
style={{
backgroundImage : `url:(${config.getUploadUrl()}/${photoDir}/main_${photo})`
}} />
HTML
<a href="javascript:void(0);" class="img box med no_img photo act"></a>
Upvotes: 0
Views: 180
Reputation: 1509
remove the :
after url
its invalid value for backgroundImage
Upvotes: 1