Next.js 使用指南2-路由与加载

书接上文 Next.js 使用指南1-基本规则 ,这节我们将过渡到一些高级的功能。涉及到的内容包含:路由、高阶组件、预加载、动态路由等等,快来开始吧! 一、路由拦截 import Router from 'next/router' Router.beforePopState(({ url,as, options }) => { // I only want to allow these two routes! if...