React ‘Invalid Hook Call’ 오류와 상태/데이터 관리 패턴 실무 사례, 원인, 해결
1. 문제 상황(1) 실제로 발생한 오류 메시지(원문/해석)Warning: React has detected a change in the order of Hooks called by MaintenanceTable. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks해석:React가 MaintenanceTable 컴포넌트에서 Hook 호출 순서가 바뀌는 것을 감지했습니다. 이 문제를 수정하지 않으면 버그와 오류가 발생할 수 있습니다. 자세한 내용은 Rules of Hooks 문서를 참고하세요.Uncaught Error:..