Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
起因:
解決辦法:
splice改slice, splice會改變源數據
原因:
react props是單向數據傳輸的, 但是項目用了splice修改了props的源數組數據, 導致控制檯打印源數組數據展開是[]的現象;
react 規定props是單向數據流, 但是沒想到還能被修改到, 因此引出各種莫名其妙的bug, 謹以此發貼記錄.