14 ms·
What you describe is the "old" way to use promises. Instead, you can yield promises inside generator functions, or better yet use async/await with a transpiler
by onestone 11y ago
What you describe is the "old" way to use promises.
Instead, you can yield promises inside generator functions, or better yet use async/await with a transpiler. Both methods give you nice sync-looking code.
- dmak 11y agoGood to know!