React Common Hooks Snippets
Visual Studio Code extension
import
prefix |
body |
~im |
import React |
~imh |
import React, { useEffect, ... useState} |
hooks
prefix |
body |
~us |
useState |
~usts |
useState TypeScript |
~uc |
useContext |
~ur |
useRef |
~ue |
useEffect |
~uer |
useEffect + return |
~um |
useMemo |
~ucb |
useCallback |
~udv |
useDeferredValue |
~uid |
useId |
~ut |
useTransition |
~urd |
useReducer |
common
prefix |
body |
~comp |
export default function Comp() {...} |
~if |
{condition && ...} |
~ife |
{condition ? ... : ...} |
~map |
{list.map((item) => ... )} |
~mapk |
{list.map((item, index) => ... )} |
| |