https://github.com/alduncanson/react-hooks-snippets
Visual Studio Code extension, code snippets for React Hooks
https://github.com/alduncanson/react-hooks-snippets
hacktoberfest hooks javascript react snippets vscode
Last synced: about 2 months ago
JSON representation
Visual Studio Code extension, code snippets for React Hooks
- Host: GitHub
- URL: https://github.com/alduncanson/react-hooks-snippets
- Owner: alDuncanson
- License: mit
- Created: 2019-04-17T03:58:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-02-15T21:23:55.000Z (3 months ago)
- Last Synced: 2025-02-15T21:27:28.574Z (3 months ago)
- Topics: hacktoberfest, hooks, javascript, react, snippets, vscode
- Homepage: https://alduncanson.github.io/react-hooks-snippets/
- Size: 1.01 MB
- Stars: 42
- Watchers: 1
- Forks: 18
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
![]()
# React Hooks Snippets




A [Visual Studio Code](https://code.visualstudio.com/) extension that adds snippet functionality for [React Hooks](https://react.dev/reference/react/hooks).
> Now updated to support all of the new hooks introduced in [React v19](https://react.dev/blog/2024/12/05/react-19)!
## 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](https://marketplace.visualstudio.com/items?itemName=AlDuncanson.react-hooks-snippets) and click `Install`.## License
Usage is provided under the [MIT License](https://opensource.org/licenses/MIT). See [LICENSE.txt](https://github.com/alDuncanson/react-hooks-snippets/blob/master/LICENSE.txt) for the full details.## Support My Work
If you like this extension, please consider supporting me by buying me a coffee!