logo

React Hooks[useEffect()] How to avoid infinite loops

* 관련 기술 스택이 없습니다
emoji

• React Hooks allows function components to have a state.
• The useState() method is used to declare the initial state.
• The useEffect() method deals with all lifecycle methods, but can cause infinite loops if not used correctly.
• Adding an empty array as an argument to useEffect() can prevent infinite loops.

thumbnail
북마크
공유하기
신고하기
1분 분량
조회수 101
profile-image뱅진
일 년 전
Copyright © 2024. Codenary All Rights Reserved.