1
試圖弄清楚如何獲取實際呈現爲鏈接的鏈接。在我從Json文件讀取這行文本之後,反應將超鏈接呈現爲文本文本,但並未將其呈現爲鏈接。在JSON中獲取HTML以在React Component中呈現爲HTML
someData.json
[{
"about": "John has a blog you can read <a href=\"http://www.john.com/blog/\" target=\"_blank\">here</a>."
}]
someComponent.js
const Person = Component({
store: Store('/companies'),
render(){
var company = this.store.value()[this.props.companyId];
return (
<div id='ft-interviewee className="all-100"'>
<p className="section-heading bold padding-top-20 font-22">Person</p>
<div className="column-group horizontal-gutters">
<div className="all-10">
<div>{company.people.person.about}</div>
</div>
</div>
)
}
});
你不能在'img'標籤的'src'屬性中放置一個錨標籤... –
垃圾壞帖子,保持 – PositiveGuy