에러 해결

maximu·2021년 4월 7일
0

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하는 컴포넌트의 첫 글자를 대문자로 바꿔주면 해결 됩니다.

function abc(

);
export default abc

->

function Abc(

);
export default Abc

해결!

0개의 댓글