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!
Prefix | Snippet |
---|---|
ush |
useState |
urdh |
useReducer |
Prefix | Snippet |
---|---|
uch |
useContext |
Prefix | Snippet |
---|---|
urh |
useRef |
uihh |
useImperativeHandle |
Prefix | Snippet |
---|---|
ueh |
useEffect |
uleh |
useLayoutEffect |
uieh |
useInsertionEffect |
Prefix | Snippet |
---|---|
umh |
useMemo |
ucbh |
useCallback |
uth |
useTransition |
udvh |
useDeferredValue |
Prefix | Snippet |
---|---|
ufsh |
useFormStatus |
Prefix | Snippet |
---|---|
udbvh |
useDebugValue |
uidh |
useId |
usesh |
useSyncExternalStore |
uash |
useActionState |
uoh |
useOptimistic |
Add the React Hooks Snippets extension to VS Code using one of the following methods:
Launch VS Code Quick Open (Ctrl+P
), paste ext install AlDuncanson.react-hooks-snippets
, and press enter.
Launch VS Code Extension Marketplace UI (Ctrl+Shift+X
), search for React Hooks Snippets
, and look for my logo!
Visit the extension's Visual Studio Marketplace page and click Install
.
Usage is provided under the MIT License. See LICENSE.txt for the full details.
If you like this extension, please consider supporting me by buying me a coffee!