Vercel: Build and deploy the best Web experiences with The Frontend Cloud – Vercel
Vercel's Frontend Cloud gives developers the frameworks, workflows, and infrastructure to build a faster, more personalized Web.
vercel.com
- 사전작업: 깃허브에 프로젝트 올리기
- packga.json script에 build, start 추가 → push
- 코드 보기
- "scripts": { "dev": "next dev", "build": "next build", "start": "next start" },
- vercel에 새프로젝트 추가 → 내 프로젝트 선택
- configure project 정의 그리고 deploy
- 프로젝트 이름 설정, 다른 거는 변경할 거 없음.
⚠️비디오가 늦게 로딩되는 이슈!
export default function Movie({title, id, poster_path}: IMovieProps) {
const router = useRouter();
const onClick = () => {
router.push(`/movies/${id}`);
};
return (
<div className={styles.movie}>
<img src={poster_path} alt={title} onClick={onClick}/>
<Link prefetch href={`/movies/${id}`}>{title}</Link>
</div>
)
}
- prefetch 추가하면 됨!
'언어 > Next.js' 카테고리의 다른 글
[react-select] 리액트 셀렉트 커스텀하기 (0) | 2024.07.13 |
---|---|
[react-select] 리액트 셀렉트 사용해보기 (1) | 2024.07.07 |
[제로초 Next.js] 패러렐 라우트, 인터셉팅 라우트 (0) | 2024.03.26 |
[Next.js] @nextui-org/react 오류 (0) | 2024.02.26 |
[Next.js] 기본 (0) | 2024.02.12 |