useEffect
我现在正在将其转换为打字稿的 javascript 项目中的钩子中有异步函数:
(async ():Promise<void> => {
const stuff = await doStuff()
setThings(stuff)
})()
以前工作没有问题,但现在在打字稿中我收到一个错误:
...
"severity": 8,
"message": "Replace `(async·():` with `;(async·():·`",
"source": "eslint",
...