📅  最后修改于: 2022-03-11 14:48:24.211000             🧑  作者: Mango
// Credit to: Long Nguyen
// Source: https://stackoverflow.com/questions/33846682/react-onclick-function-fires-on-render
// Because you are calling that function instead of passing the function
// to onClick, change that line to this:
// => called Arrow Function, which was introduced in ES6,
// and will be supported on React 0.13.3 or upper.