본문 바로가기

[내일배움캠프]/TIL

23.02.13) 최종 프로젝트 작업을 진행한 73일차

이 호출과 일치하는 오버로드가 없습니다.

타입이 정해지지 않아서 나오는 오류...

각 타입의 임시방편으로 :any를 붙여 해결...추후에 타입을 다시 수정해야 한다 ㅠㅠ..

 

Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

훅(Hook)은 반드시 함수 컴포넌트 내부에 호출해야한다.

나는 이 것을 usestate에서 발견했는데 함수 안에 넣었는데도 오류가 발생한 것이다...

해결..못했다..다시 작성해서 해결..ㅠㅠ!!

 

_app.tsx 는 root 컴포넌트같은 역할이다.

 

next-auth 

npm create next-app next-auth-test --typescript
npm i next-auth
​
// or
​
yarn create next-app next-auth-test --typescript
yarn add next-auth

NextJS 에서 next-auth 라는 라이브러리를 이용하면 google , facebook , naver 같은 소셜 로그인 기능을 쉽게 관리 및 추가 할 수 있습니다.