React Hooks Snippets is a Visual Studio Code extension to make writing ReactJS Hooks easier and faster!
The current supported snippets are: useState
, useEffect
, useContext
, useCallback
, useMemo
, useRef
, useReducer
, useSelector
, useDispatchFunction
, useDispatch
, as well as snippets for import react hooks
and import react redux hooks
.
Type ush
to u
se s
tate h
ook!
Type ueh
to u
se e
ffect h
ook!
Type uch
to u
se c
ontext h
ook!
Type ucbh
to u
se c
all b
ack h
ook!
Type umh
to u
se m
emo h
ook!
... More have been added! See below
Type urh
to u
se r
ef h
ook
Type urdh
to u
se r
ed
ucer h
ook
Type uss
to u``s
e s
elector hook
Type usdf
to u``s
e d
ispatch f
unction hook
Type usd
to u``s
e d
ispatch hook
Type irh
to import React and the most commonly used hooks
Type irrh
to i
mport r
eact r
edux h
ooks
Type prev
to use prev
ious state
There are 2 ways you can add React Hooks Snippets to your project:
Launch VS Code Quick Open (Ctrl+P), paste the ext install AlDuncanson.react-hooks-snippets
, and press enter.
Launch VS Code Extension Marketplace (Ctrl+Shift+X), search for React Hooks Snippets
, and look for my logo!
- add
useReducer
hook - add
useCallback
hook - add
useMemo
hook - add
useRef
hook - add
useImperativeHandle
hook - add
useLayoutEffect
hook - add
useDebugValue
hook
Pull requests are more than welcomed!
Usage is provided under the MIT License. See LICENSE.txt for the full details.