📜  反应替换数组中的对象 - Delphi 代码示例

📅  最后修改于: 2022-03-11 14:54:56.296000             🧑  作者: Mango

代码示例1
_updateStyle (props) {
  const { typeElements } = this.state;
  const updatedHeaders = [...typeElements.headers];
  updatedHeaders[props.index] = props;
  this.setState({
    ...this.state,
    typeElements: {
      ...typeElements,
      headers: updatedHeaders
    }
  ));
}