React inline style - style prop expects a mapping from style properties to values, not a string

后端 未结 6 1138
北荒
北荒 2020-12-13 08:03

I am trying to set inline styles in my React application. In this case, for a span:



        
6条回答
  •  清歌不尽
    2020-12-13 08:38

    JSX and html are different things and we have a little different syntax to add inline css in jsx I would recommend to go through whole documentation for better understanding https://www.w3schools.com/react/react_css.asp

提交回复
热议问题