Error: [mobx] Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended.


1.Error: [mobx] Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. 

錯誤:[MOBX]由於啟用了嚴格模式,所以不允許改變觀察到的在動作之外的值。如果此更改是有意的,請將代碼包在“Actudio”中。

解決方法:利用回調函數 或 將@observable數據 放在 另一個 @action 中


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM