Next.js -How to use Dynamic Routes


Next.js -How to use Dynamic Routes

Defining routes by using predefined paths is not always enough for complex applications. In Next.js you can add brackets to a page ([param]) to create a dynamic route (a.k.a. url slugs, pretty urls, and others). 사전에 정의된 경로를 사용하는 라우팅은 복잡한 어플리케이션에 항상 적합하지 않습니다. Next.js 에서는 {}을 사용하여 동적인 라우팅이 가능하게 합니다. import { useRouter } from 'next/router' const Post = () => { const router = useRouter() const { pi..


원문링크 : Next.js -How to use Dynamic Routes