慕工程0101907
2019-08-03 07:03:54
對“回頭見”是否有表現(xiàn)上的顧慮?我看到有一個埃林特法則,no-return-await,因為拒絕return await.在規(guī)則的描述中,它指出return await加"extra time before the overarching Promise resolves or rejects".然而,當我看到MDNasync功能文檔,“簡單示例”顯示了一個包含return await沒有任何描述為什么這可能是一個性能問題。是return await一個實際的性能問題,就像Elint文檔所建議的那樣?如果是,怎么做?
3 回答

翻閱古今
TA貢獻1780條經(jīng)驗 獲得超5個贊
return x+0
return x
x
.then(x => x)
.
async
/await
.
try { … return await …;} …
await
catch
finally
return

喵喔喔
TA貢獻1735條經(jīng)驗 獲得超5個贊
.then(x => x)
.then((x) => x.data)
.then(x => x.data)
添加回答
舉報
0/150
提交
取消