3
<a>
タグを正しく追加するにはどうすればよいですか?私は<Link></Link>
ReactJS Linkタグ - Uncaught ReferenceError:リンクが定義されていません
Uncaught ReferenceError: Link is not defined
コードを追加するために、このエラーが出る:
render() {
return (
<div>
<Link className="button-close-overlay"><span className="glyphicon glyphicon-remove"></span></Link>
<article>
<div className="container">
<div className="content align-center" dangerouslySetInnerHTML={{__html: this.state.article.content}}></div>
</div>
</article>
</div>
);
}
全体コード:
class Article extends React.Component
{
constructor(props) {
super(props);
this.state = {
article: [],
};
}
// Then fetch the data using $.get():
componentDidMount() {
this.serverRequest = $.get(this.props.source, function (result) {
this.setState({
article: result
});
}.bind(this));
}
componentWillUnmount() {
this.serverRequest.abort();
}
render() {
return (
<div>
<link className="button-close-overlay"><span className="glyphicon glyphicon-remove"></span></link>
<article>
<div className="container">
<div className="content align-center" dangerouslySetInnerHTML={{__html: this.state.article.content}}></div>
</div>
</article>
</div>
);
}
}
export { Article as default }
任意のアイデア?
awwは私が見るだろう!より良い ""にフォールバックします!ありがとう! :-) – laukok