# React Hook ###### tags: `react` `hook` 在 useEffect 中不要使用 await ```javascript= useEffect(async()=>{ await someFunction(); }) ``` 應該把需要 await 的 function 移出來 ```javascript= useEffect(()=>{ someAsyncFunction(); }) someAsyncFunction = async() =>{ await someFunction(); } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up