我将2个值传递给子组件:
- 要显示的对象列表
 - 删除功能。
 
我使用.map()函数显示对象列表(如React教程页面中给出的示例中所示),但是该组件中的按钮在onClickrender上触发该函数(不应在渲染时触发)。我的代码如下所示:
module.exports = React.createClass({
    render: function(){
        var taskNodes = this.props.todoTasks.map(function(todo){
            return (
                <div>
                    {todo.task}
                    <button type="submit" onClick={this.props.removeTaskFunction(todo)}>Submit</button>
                </div>
            );
        }, this);
        return (
            <div className="todo-task-list">
                {taskNodes}
            </div>
        );
    }
});
我的问题是:为什么onClick函数在渲染时触发,如何使其不触发?