【发布时间】:2016-10-20 22:03:11
【问题描述】:
我在 jsx 中使用   标记,它没有渲染空间。以下是我的代码的一个小sn-p。请帮助。
var Reporting=React.createClass({
render: function(){
return(
<div style={divPositionReporting}>
<p>Pricing Reports</p>
<hr></hr>
Select Scenario:
<select>
<option></option>
</select>
<button type="button">Get Pricing Report</button>
<br/>
Select Takeout Scenario:
<select>
<option></option>
</select>
<button type="button">Get Pricing Report</button>
<br/>
</div>
);
},
});
【问题讨论】:
-
你搜索了吗?第一次点击:google.com/search?q=react+html+entities
-
我认为您的代码没有任何问题。使用哪个 Babel 和 React 版本?确保使用最新版本。您可以在Babel repl 中看到生成的代码包含不间断的空白字符。
-
现在第一个热门就是这个。 :) duckduckgo.com/?q=jsx+nbsp