Marc
Marc

Reputation: 7022

ReactJS removing style tag

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

Answers (1)

Sagi_Avinash_Varma
Sagi_Avinash_Varma

Reputation: 1509

remove the : after url its invalid value for backgroundImage

Upvotes: 1

Related Questions