Why is React.js removing the srcset tag on ?

后端 未结 3 1077
南方客
南方客 2021-01-03 21:25

When I have the srcset property on my tag, why doesn\'t it show up in the browser? It appears as through React.js is stripping it out

3条回答
  •  旧时难觅i
    2021-01-03 22:13

    The solution is to use srcSet instead of srcset.

    
    

    Reference: https://facebook.github.io/react/docs/tags-and-attributes.html under HTML Attributes

提交回复
热议问题