注意:For DOM differences,such as the inline style attribute,check here.

// bad: it displays "FIrst · second" 
<div>{'First &middot; Second'}</div>

  There are various ways to work-around this issue.The easiest one is to write unicode cahracter directly in JavaScript.You need to make sure the file is saved as UTF-8 and that the proper UTF-8 directive are set so the brower will display it correctly.

<div>{'First \u00b7 Second'}</div>
<div>{'First' + String.fromCharCode(183) + 'Second'}</div>

  

<div>{['First',<span>·</span>,'Second']}</div>

  

<div dangerouslySetInnerHTML = {{__html:'First · Second'}}>

 

  if you pass properties to native HTML elements that do not exist in the HTML specification,React will not render them. if you want to use a custom attribute,you should prefix it with data-

<div data-custom-attribute = "foo">

  web Accessibility attributes starting with aria- will be rendered properly.

<div aria-hidden = {true}>