일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- tailwindcss
- API
- solidity
- Props
- hardhat
- Interface
- express.js
- blockchain
- built in object
- CSS
- concept
- typeScript
- 삶
- evm
- JavaScript
- CLASS
- useState
- Ethereum
- REACT
- node.js
- error
- SSR
- Redux
- bitcoin
- middleware
- graphQL
- web
- HTML
- 기준
- nextJS
- Today
- Total
목록async (2)
ReasonJun
The useState hook is designed to be used within a functional component, and it cannot be used inside an asynchronous function. In Next.js, async operations are typically handled using the useEffect hook or by using server-side rendering (SSR) or static generation (SG) methods. If you need to perform an asynchronous operation and update state based on the result, you can use the useState hook in ..

Only one call stack can be executed at a time. To use it asynchronously, you must use the Web API. So, if you throw the desired callback function to this API, it performs asynchronous work internally, and when it is finished, the callback function is put in the Task Queue. After that, the event loop of the javascript engine monitors the call stack and task queue, and only when the call stack is ..