Try changing your onClick to an arrow function: <button onClick={() => this.changeName()}>click</button>. This preserves the meaning of this ...
確定! 回上一頁