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