Ember.js 2.0 - 在一次渲染弃用警告中修改属性两次

标签 ember.js deprecated

我正在使用当前的 Ember 2.0 测试版 (beta 1) 开发应用程序,并开始看到这个弃用警告:

You modified XXX twice in a single render. This was unreliable in Ember 1.x and will be removed in Ember 2.0

看起来违规者是被多次重新计算的计算属性,因为它们的依赖键在单个运行循环中被多次更新。然而,弃用的堆栈跟踪不会返回到我的任何应用程序代码,我认为无论如何,Ember 应该已经默默地为我处理了这件事。

在发布 v2.0 final 之前,我是否需要在我的应用程序代码中主动修复它,或者它只是一个“内部”弃用通知?如果我确实需要进行更改,是否有任何我应该注意的常见反模式或陷阱会导致此错误?

最佳答案

如果你错过了它,这应该在 master 中修复:https://github.com/emberjs/ember.js/issues/11519

关于Ember.js 2.0 - 在一次渲染弃用警告中修改属性两次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31347022/

相关文章:

javascript - 存储在数组中的 Ember.js 绑定(bind)模型

javascript - Ember : Loading data for other route

javascript - 存储并返回到 Ember 路线

ember.js - Ember 从 Controller 中的操作更改查询参数

C++简单程序错误

jquery - 为什么 jQuery 1.9+ attr() 方法没有被弃用?

ember.js - 如何为所有 RESTAdapter ember 请求添加 header

ios - 不推荐使用RotateFromInterfaceOrientation吗?

migration - 是否可以在GraphQL上弃用突变?

ruby-on-rails - 我仍然不赞成rake/rdoctask