dynamic1 Router(Static & Dynamic routing) Query ,TIL(복습 5일차) Routing, 페이지를 이동하자 라우터(router) 객체란 페이지 이동과 관련된 기능을 가지고 있는 객체이다. 이 객체를 사용해서 A 페이지에서 B 페이지로 이동할 때, "B 페이지로 라우팅한다"고 말한다. const router = useRouter() router.push("이동할 페이지") import Router from 'next/router' export default function Routing() { const handleClickPathname = () => { const pathname = Router.pathname alert(pathname) } const handleClickAsPath = () => { const asPath = Router.asPath alert(asPat.. 2022. 3. 21. 이전 1 다음