Common
|
|
JS |
TS |
TSX |
cv |
Add constant variable |
• |
• |
• |
cvt |
Add typed constant variable |
|
• |
• |
tl |
Add template literal |
• |
• |
• |
cf |
Add const foo = () => {} |
• |
• |
• |
cfa |
Add const foo = (bar: type) => {} |
|
• |
• |
cfo |
Add const foo = ({}: type) => {} |
|
• |
• |
tc |
Add try/catch statement |
• |
• |
• |
tcf |
Add try/catch/finally statement |
• |
• |
• |
cl |
console.log('') |
• |
• |
• |
cd |
console.log('data', data) |
• |
• |
• |
cdd |
logger.b('data', data) |
• |
• |
• |
Next / React
|
|
JS |
TS |
TSX |
|
cc |
Create client component |
|
|
• |
|
sc |
Create server component |
|
|
• |
|
sp |
Add searchParams prop |
|
|
• |
|
uc |
Add 'use client' directive |
|
• |
• |
|
us |
Add 'use server' directive |
|
• |
• |
|
sac |
Add server action for client component |
|
• |
|
|
sas |
Add server action for server component |
|
• |
|
|
us |
Use useState() hook |
|
|
• |
|
ue |
Use useEffect() hook |
|
|
• |
s |
up |
Use usePathname() hook |
|
|
• |
|
ur |
Use useRouter() hook |
|
|
• |
|
ut |
Use useTransition() hook |
|
|
• |
|
usp |
Use useSearchParams() hook |
|
|
• |
|
ec |
Handle client component error |
|
|
• |
|
sae |
Handle server action error |
|
• |
|
|
Author
endeveron
License
This project is licensed under the MIT License.
| |