Skip to content

conradhunter/next-ts-snippets

Repository files navigation

next-ts-snippets


next-ts-snippets contains snippets for NextJS 13 with TypeScript.

Installation

In order to install an extension you need to launch the Command Pallete (Ctrl + Shift + P or Cmd + Shift + P) and type Extensions. There you have either the option to show the already installed snippets or install new ones. Launch VS Code Quick Open (Ctrl + P or Cmd + P), paste the following command, and press enter.

ext install next-ts-snippets

Alternatively you can open the extensions panel and search for 'next-ts-snippets'.

Supported languages (file extensions)

  • TypeScript (.ts)
  • TypeScript React (.tsx)

Release Notes

1.0.0

Initial release of next-ts-snippets 🎉 🎉 🎉

Snippets

Snippet Output
File Conventions
tsnxpg page file
tsnxld loading file
tsnxer error file
tsnxnf not-found file
tsnxrl root layout file
tsnxl layout file
tsnxdr dynamic route
---------------- ----------------
Next 13 Component
tsnxcl client component
tsnxsv server component
---------------- ----------------
API Routes
getapi GET route
postapi POST route
putapi PUT route
deleteapi DELETE route
patchapi PATCH route
optionsapi OPTIONS route
headapi HEAD route
---------------- ----------------
Functions
dymd generateMetadata
gsp generateStaticParams
---------------- ----------------

Suggestions and Issues

If you have any suggestions or issues, feel free to open an issue or a pull request.

License

MIT

Enjoy!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published