hook
-
useEffect를 제대로 사용하는 방법 (feat. dan abramov's 포스팅)React 2022. 7. 14. 19:47
쭉 읽어보니 평소에 useEffect를 사용할 때 놓쳤던 부분들을 많이 발견할 수 있었습니다. 친절하게도 마지막에 다시 한 번 wrap 해주는 부분이 있어서 원문으로 가져왔습니다. 아래에 원문을 의역해서 다시 정리해보았습니다. 원문 Unlike events, effects are caused by rendering itself rather than a particular interaction. Effects let you synchronize a component with some external system (third-party API, network, etc). By default, effects run after every render (including the initial one). React..