1. 調用已經寫在的組件的setState 方法,導致錯誤
問題: warning.js:45 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the TreeSelect component.

解決方案:
在 組件卸載的生命周期里面, 把在組件外部定義的變量 設置為 null, 這樣JS的垃圾回收機制就會把 組件外部定義的變量 回收. 而不造成 內存泄露
componentWillUnmount(){
treeNodeClickHandler = null
},

注意: 如果在 getinitialState 里面注冊的事件, 需要在 componentWillUnmount 里面清除掉, 否則容易造成內存泄露
