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

后端 未结 6 1137
北荒
北荒 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:57

    JSX AND HTML are different:

    In HTML it is

    In JSX you write

    Conditional inline formatting are different in both.

提交回复
热议问题