Add a property to the object in the react+typescript project to report an error

an error was reported in the field of adding an iconImg to the object data in

react?
Project usage (typescript+react)

clipboard.png

import * as React from "react";
import { Row,Col } from "antd";
import s from "./catalog.less";

interface DashProps {
    userName ?: any;
}
export default class Index extends React.Component<DashProps, any> {
    constructor(props:DashProps) {
        super(props);
        this.state = {
            data:[]
        }
    }
    componentDidMount(){
        // let {data}=this.props;
        let data= [
            {
                title:"",
                content:"1",
                point:["",""]
            },
            {
                title:"",
                content:"2",
                point:["",""]
            },
            {
                title:"",
                content:"3",
                point:["",""]
            }
        ]
        let iconArr=["/src/assets/img/pointIncon.png","/src/assets/img/pointIncon2.png","/src/assets/img/pointIncon3.png"]

        data=data.map((item,index)=>{
            item.iconImg=iconArr[index]
            return item
        })
        this.setState({data})
    }
    render() {
        let {data}=this.state;
        let items=data.map((item,index)=>{
            return (
                    <div key={index} className={s.item}>
                        <div className={s.df}>
                            <span className={s.mr15}><img src={item.iconImg} alt="" className={s.mt5}/></span>
                            <h2 className={s.fx1}>{item.title}</h2>
                        </div>
                        <div className={s.content}>{item.content}</div>
                        <ul className={s.ml40}>
                            {
                                item.point.map((pointItem,pointIndex)=>{
                                    return <li key={pointIndex}>{pointItem}</li>
                                })
                            }
                        </ul>
                    </div>
            )
        })
        return(
            <div className={s.container}>
                {items}
            </div>
        )
    }
}
Mar.04,2021

clipboard.png
the error report makes it clear that there is no iconImg attribute


interface IData {
    title: string;
    content: string;
    point: string[];
    [x: string]: any;
}

you can add any attribute in this way

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e461ac-44ba7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e461ac-44ba7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?