rsnext/examples/custom-routes-proxying/pages/hello/[slug].js
JJ Kasper 051481c55c
Add example for proxying upstream with custom routes (#14374)
As discussed this adds an example to demonstrate how you can achieve proxying upstream requests that didn't match any pages/assets in Next.js which can be helpful in achieving incremental migration
2020-06-22 00:44:04 +00:00

13 lines
290 B
JavaScript

import Link from 'next/link'
import { useRouter } from 'next/router'
export default function About() {
return (
<div>
<h3>This is the `hello/[slug]` page. slug: {useRouter().query.slug}</h3>
<Link href="/">
<a> &larr; Back home</a>
</Link>
</div>
)
}