How to add custom html attributes in JSX

后端 未结 11 1968
南方客
南方客 2020-11-27 18:14

There are different reasons behind it, but I wonder how to simply add custom attributes to an element in JSX?

11条回答
  •  臣服心动
    2020-11-27 18:42

    Consider you want to pass a custom attribute named myAttr with value myValue, this will work:

    
    

提交回复
热议问题