我没有做出反应就把这个错误抛给了我:Expected corresponding JSX closing tag for <li>
因为一切都很好,只有当我有多个li
元素时
render() {
return (
<nav className="navbar navbar-inverse navbar-fixed-top" id="sidebar-wrapper" role="navigation">
<ul className="nav sidebar-nav">
<li>
<a href="#" className="active">
<i className="fa fa-home"></i>Home
</a>
</li>
<li>
<a className="collapsible-header waves-effect arrow-r">
<i className="fa fa-user"></i> About me<i className="fa fa-angle-down rotate-icon"></i>
</a>
<li>
</ul>
</nav>
);
}
有人可以帮我解决这个问题吗?
答案 0 :(得分:3)
您在第二次结束li
时缺少斜杠:
<li>
<a className="collapsible-header waves-effect arrow-r">
<i className="fa fa-user"></i> About me<i className="fa fa-angle-down rotate-icon"></i>
</a>
</li>