Clojure (1) 썸네일형 리스트형 리액트 훅의 클로저 트랩(closure trap) 이해하기 원문 주소 : https://betterprogramming.pub/understanding-the-closure-trap-of-react-hooks-6c560c408cde Understanding the Closure Trap of React Hooks Digging into the classic problem betterprogramming.pub 문제 import { useEffect, useState } from 'react'; export default function App() { const [count, setCount] = useState(0); useEffect(() => { setInterval(() => { setCount(count + 1); }, 1500); }, []); useE.. 이전 1 다음