-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
페이지 UI: 메인 페이지 #76
페이지 UI: 메인 페이지 #76
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const Banner = dynamic(() => { return import('@components/shared/carousel/Banner'); }, { | ||
loading: () => { return <h2>안녕핫[ㅔ요</h2>; }, | ||
}); | ||
const RecommandList = dynamic(() => { return import('@components/shared/carousel/RecommandList'); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://blog.rhostem.com/posts/2020-05-10-nextjs-and-dynamic-import
next.js에서 dynamic import 사용하는 이유: 위 링크 한번 보시면 좋을 것 같아요!
swiper.js를 이용한 컴포넌트는 dynamic import를 사용해야 'use client' 없이 main 페이지에서 사용할 수 있습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 신기하네요😲 dynamic import는 'use client' 없을 때 사용하면 될까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아뇨!! 그건 'use client'가 사용된 컴포넌트도 'use client'가 없는 페이지에서 사용할 수 있어요!
하지만 swiper.js의 경우는 dynamic import를 해야 에러가 발생하지 않아서 설정해뒀어요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다! 고생하셨습니닷👍
해당 사항 (중복 선택)
설명
Key Changes
How it Works
To Reviewers
추후에 라이브러리를 지우고 새로 제작하거나 멘토분께 여쭤볼 예정입니다!