React

[React] JS Bites: React hook is called in a function which is neither a React function or a custom React Hook

mxxn 2023. 9. 7. 16:57

문제

: 오류 - JS Bites: React hook is called in a function which is neither a React function or a custom React Hook

문제 해결

  1. React Hook을 사용하고 있다면 Functional Component는 반드시 "대문자" 로 시작해야 한다
  2. custom hook의 이름은 반드시 "소문자"로 시작해야한다.