V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
qweweretrt515
V2EX  ›  问与答

前端问题,有了 observable,是不是基本可以淘汰 promise 了?

  •  
  •   qweweretrt515 · 2017-04-03 20:28:07 +08:00 · 2814 次点击
    这是一个创建于 2586 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近网上看了一个文章,都是说 observable 比 promise 更好

    所以想问问大家, 是不是都选 observable

    yyfearth
        1
    yyfearth  
       2017-04-04 05:14:22 +08:00   ❤️ 1
    虽然 observable 很多时候比 promise 强大很多
    但是 promise 的浏览器集成好

    而且 当你用过 async await 后 你会觉得 很多情况下 没必要用 observable 了
    而 async await 就是用的 promise
    qweweretrt515
        2
    qweweretrt515  
    OP
       2017-04-04 10:06:11 +08:00
    @yyfearth 谢谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2361 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 13:13 · PVG 21:13 · LAX 06:13 · JFK 09:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.