Skip to content

alDuncanson/react-hooks-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Hooks Snippets icon

React Hooks Snippets

Visual Studio Marketplace Installs Visual Studio Marketplace Rating Visual Studio Marketplace Version GitHub Repo stars GitHub forks

A Visual Studio Code extension that adds snippet functionality for React Hooks.

Now updated to support all of the new hooks introduced in React v19!

Supported Hooks

State Hooks

Prefix Snippet
ush useState
urdh useReducer

Context Hooks

Prefix Snippet
uch useContext

Ref Hooks

Prefix Snippet
urh useRef
uihh useImperativeHandle

Effect Hooks

Prefix Snippet
ueh useEffect
uleh useLayoutEffect
uieh useInsertionEffect

Performance Hooks

Prefix Snippet
umh useMemo
ucbh useCallback
uth useTransition
udvh useDeferredValue

React Dom Hooks

Prefix Snippet
ufsh useFormStatus

Other Hooks

Prefix Snippet
udbvh useDebugValue
uidh useId
usesh useSyncExternalStore
uash useActionState
uoh useOptimistic

Install

Add the React Hooks Snippets extension to VS Code using one of the following methods:

By command

Launch VS Code Quick Open (Ctrl+P), paste ext install AlDuncanson.react-hooks-snippets, and press enter.

By the Marketplace UI

Launch VS Code Extension Marketplace UI (Ctrl+Shift+X), search for React Hooks Snippets, and look for my logo!

By the Marketplace website

Visit the extension's Visual Studio Marketplace page and click Install.

License

Usage is provided under the MIT License. See LICENSE.txt for the full details.

Support My Work

If you like this extension, please consider supporting me by buying me a coffee!

Buy Me A Coffee