rsnext/docs/basic-features
jpveilleux 0234e6d553
Added type to Page Component for TypeScript (#36608)
* Added type to Page Component for TypeScript

Following this tutorial, I noticed that TS was complaining that "getLayout" did not exist on Page. That is normal since Page is typed as NextPage. I simply exported the new type we create in "_App.tsx" and used it as the return type for Page. This will probably help others seeing that red in their editors and perhaps being confused.

* Small linting change

* Apply suggestions from code review

* Update layouts.md

* lint fix

* update type

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-05-03 15:58:31 -05:00
..
data-fetching Add docs about SSR caching (yes, you can do this with Next.js) (#36588) 2022-04-30 16:45:54 +00:00
built-in-css-support.md Encourage installation of sass as a devDep (#35323) 2022-03-15 15:42:36 +01:00
environment-variables.md Update Middleware docs to add version history. (#34302) 2022-02-13 22:46:30 +00:00
eslint.md Fix broken data fetching links in docs (#33766) 2022-04-22 14:03:07 +02:00
fast-refresh.md docs: minor text-copy cleanup (#33120) 2022-01-10 10:52:47 +00:00
font-optimization.md Adds <link rel="preconnect" ... /> to example optimized font output (#36529) 2022-04-28 00:04:18 +00:00
image-optimization.md Update next/image docs for width & height (#35188) 2022-03-17 15:16:15 -04:00
layouts.md Added type to Page Component for TypeScript (#36608) 2022-05-03 15:58:31 -05:00
pages.md Changed data fetching file name to overview to fix meta data title (#33232) 2022-01-27 09:14:14 -06:00
script.md Adds inline script functionality to next/script for worker and beforeInteractive strategies (#36364) 2022-04-29 15:20:31 +00:00
static-file-serving.md Update err.sh links to use nextjs.org/docs/messages instead (#23353) 2021-03-29 10:25:00 +02:00
supported-browsers-features.md Update supported-browsers-features.md (#28326) 2021-08-20 11:52:20 +00:00
typescript.md Updated create-next-app docs to include pnpm usage (#35755) 2022-03-30 21:03:21 +00:00