setState報錯
問題一:配置好路由,點擊“我的私人音樂坊”進入到歌曲列表頁面后,功能可以實現,但是會報錯:Warning: setState(...): Can only update a mounted or mounting component. This us。。。 問題二:在做“上一曲”、“下一曲”的功能時,會出現這樣一個報錯,“Cannot read property 'file' of undefined” 以上兩個問題,想請教哪位高人指點下。
問題一:配置好路由,點擊“我的私人音樂坊”進入到歌曲列表頁面后,功能可以實現,但是會報錯:Warning: setState(...): Can only update a mounted or mounting component. This us。。。 問題二:在做“上一曲”、“下一曲”的功能時,會出現這樣一個報錯,“Cannot read property 'file' of undefined” 以上兩個問題,想請教哪位高人指點下。
2018-03-01
舉報
2018-04-25
第二個問題:因為沒有取到那個對象 如果你看了老師的視頻然后又用了github上的代碼的話可能因為名字對不上 老師講的是currentMusicItem 但是循環(huán)那個地方用的是currentMusitItem 我的是這樣的希望對你有幫助