Navigation

    GitHub中文社区
    • GitHub排行榜

    论坛

    • Login
    • Categories
    • Recent
    • Tags
    • Popular

    手写promise遇到的问题

    技术交流
    2
    3
    181
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sugdove
      sugdove last edited by

      代码在这 :https://codesandbox.io/s/ecstatic-night-dnh16i?file=/src/promise.js
      疑问: 为何new了两个promise实例, 实际像是公用一个

      1 Reply Last reply Reply Quote 0
      • k1995
        k1995 last edited by

        then方法有问题,无法执行,状态一直是pending

        1 Reply Last reply Reply Quote 0
        • sugdove
          sugdove last edited by admin

          @k1995 箭头函数问题 改成function 可以了,感谢!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post