我有一个数组。我正在使用地图来显示它React。React 抛出有关键的错误,我不知道为什么。有什么想法为什么会React抛出这个错误吗?
{
this.state.buttons.map((button, index) => {
return (
<>
{index % 4 === 0 && (
<div key={`break-${index}`} className="w-100" />
)}
<Button key={index} char={button} click={this.pushString} />
</>
)
})}
Run Code Online (Sandbox Code Playgroud)
reactjs ×1