Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将通量与 firebase 一起使用,并发现 Firebase.on() 回调有时由同一客户端中调用的 Firebase.set() 同步触发。
这与在用户触发 firebase 集时分派一个动作和在值返回时分派另一个动作的通量模式不相符,这将破坏多分派不变量。
一种解决方法是使用 process.nextTick() 延迟突变调用。有没有办法强制在下一个滴答声中调用回调,比如 Promise 是如何工作的?或者这里有推荐的模式吗?