Skip to content

MichaelFarquhar/react-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

React Snippets

VS Code JavaScript TypeScript

Collection of my own react snippets I use, supporting both JavaScript and TypeScript.

How To Add Snippets

  • Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  • Type "Configure User Snippets" and select it
  • Choose "New Global Snippets file..."
  • Name your snippets file whatever you'd like
  • Copy and paste the snippets into the newly created file

โœ‚๏ธ Snippets

Alias Purpose
imr Import React statement
rc React Function Component with export const
rct Same as above but with a props interface
ush useState Hook
efh useEffect Hook
ech useCallback Hook
emh useMemo Hook
urh useRef Hook
tern Ternary Operator Condition
ushLoad Generic loading state hook
uihh useImperativeHandle hook
utt useTranslation hook with t function

๐Ÿ“„ License

This project is licensed under the ISC License - see the LICENSE file for details.

About

Collection of react snippets that I use, supporting both JavaScript & TypeScript.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published