无法获取未定义或空引用的属性“绑定”

时间:2020-03-22 11:20:16

标签: reactjs

render() {
        const { id, title } = this.props.toDo;

        return (
            <div style={this.getStyle()}>
                 <input type="checkbox" onChange={this.markedComplete.bind(this, id)} />
                <span>{title}</span>
                <button style={btnStyle} onClick={this.delTodo.bind(this, id)}>
                    X
                </button>
            </div>
        )
    }
}

enter image description here

0 个答案:

没有答案