Often, most snippet packages offer way more snippets than needed. The aim of this package is to provide a small set of snippets for React Hooks. Feel free to install with VSCode Marketplace, or simply copy/paste into your own config.
Below is a list of all available snippets and the triggers of each one. The → means the TAB
key.
Trigger | Content |
---|---|
uref→ |
useRef() |
ust→ |
useState() |
ueff→ |
useEffect() |
ulay→ |
useLayoutEffect() |
ucon→ |
useContext() |
ucall→ |
useCallback() |
umem→ |
useMemo() |
uimp→ |
useImperativeHandle() |
ured→ |
useReducer() |
udebug→ |
useDebugValue() |
use→ |
Generic for selecting hook |