프로그래밍 지식/Web
React component names must start with an uppercase letter react-hooks/rules-of-hooks
nextcoder
2022. 8. 1. 23:32
React hook is called in a function which is neither a React function or a custom React Hook
React Hook "useState" is called in function "컴포넌트 이름" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter react-hooks/rules-of-hooks
다음과 같은 에러는 export 하는 컴포넌트의 첫 글자를 대문자로 바꿔주면 된다.
// WRONG
export default noticeController
// RIGHT
export default NoticeController