javascript - How can await be executed repeatedly when compiled with es6 babel?
ringa_lee
ringa_lee 2017-06-12 09:31:00
0
2
963

For example:

(async () => {
    const a = await promise();
    console.log(a);
})()

The promise function can be resolved multiple times. How can the function after await be executed repeatedly?

ringa_lee
ringa_lee

ringa_lee

reply all(2)
淡淡烟草味

Promise is a single-value push type.
You can use the Observable of RxJs and you can push multiple values

仅有的幸福

http://blog.csdn.net/hzaini89...

For reference

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template