afiiif / vscode-js-ts-react-nextjs-snippets

JavaScript/TypeScript React/Next.js VSCode Snippets

Home Page:https://marketplace.visualstudio.com/items?itemName=afifu.vscode-js-ts-react-nextjs-snippets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VSCode Snippets for JavaScript, TypeScript, React/Next.js, React Query, SWR, Redux, Jest, React Hook Form, Emotion CSS, & many more

Write code faster using snippets!
Just type the snippet keyword (for example, type rfc), a suggestion will appear, then press Tab.
If there is no suggestion, use Ctrl+Space to open it.

React/Next.js snippet

Usage

  • You can just type directly πŸ‘‰ rfc
  • You can also use $ prefix πŸ‘‰ $rfc
  • You don't need to write a complete snippet prefix. For example, there is useState snippet, you can just type useSt and the suggestion will appear.

For TypeScript snippets:

  • You can add ts at the end πŸ‘‰ rfc for JS became rfcts for TS
  • Or you can use $$ prefix πŸ‘‰ $$rfc

List All Available Snippets

  • Type $ (and press Ctrl+Space if necessary), then check all available snippets.
  • Check React snippets using $r
  • Check Next.js snippets using $n
  • Check React Native snippets using $rn
  • Check React Router snippets using $rou
  • Check React Query snippets using $rq
  • Check SWR snippets using $swr
  • Check Redux snippets using $rx
  • Check Jest snippets using $t
  • Check React Hook Form snippets using $rhf
  • Check Zustand snippets using $zu
  • Check Emotion CSS snippets using $emo
  • Check Yup snippets using $yup
  • Check wrapper-snippets using $_

Examples

Next.js snippet

React Query & SWR snippet

Jest snippet

Wrapper Snippets

Type _ or $_ to check all available wrapper snippets

Wrapper snippet

Wrapper snippet

Generate-from-Clipboard Snippets

Select text and copy it πŸ“‹ write snippet and boom! πŸͺ„πŸ’₯

Generate-from-clipboard snippet

Why There Are No Snippet for Import? πŸ€”

Because you might not need that. VSCode has built-in feature for auto-import your modules. Use Ctrl+Space on your variable and a popup will appear.

VSCode built-in auto import

If auto import doesn't appear, open command palette (Ctrl+Shift+P) and select restart TS server.

Restart TS server


Donation

Buy Me A Coffee
Trakteer ID

About

JavaScript/TypeScript React/Next.js VSCode Snippets

https://marketplace.visualstudio.com/items?itemName=afifu.vscode-js-ts-react-nextjs-snippets

License:MIT License


Languages

Language:TypeScript 96.8%Language:JavaScript 2.9%Language:Shell 0.4%