我正在使用 Babel 6.0 编译 JSX 代码,我遇到了这个错误。在它说“相邻元素”需要包装在“封闭标签”中之后,它现在说标签缺少“相应的封闭标签”,尽管<div>
标签已关闭。为什么会这样?谢谢你。
这是代码:它将该</form>
行显示为错误位置。
render: function() {
return (
<div>
<form action={this.props.action} method={this.props.method}/>
<input
type={this.props.input1type}
value={this.state.input1value}
/>
<input
type={this.props.input2type}
value={this.state.input2value}
/>
</form>
</div>
);
}