Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
Expand Down
63 changes: 63 additions & 0 deletions .vscode/react.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"React Component (Arrow Function)": {
"prefix": "rcc",
"body": [
"const $1 = () => {",
" return (",
" <div>",
" $2",
" </div>",
" );",
"};",
"",
"export default $1;"
],
"description": "Create a React functional component using arrow function"
},
"React Component (Function Declaration)": {
"prefix": "rcf",
"body": [
"export default function $1 () {",
" return (",
" <div>",
" </div>",
" );",
"};"
],
"description": "Create a React functional component using function declaration"
},
"React useState Hook": {
"prefix": "usf",
"body": ["const [$1, set$2] = useState($3);"],
"description": "React useState Hook"
},
"React useEffect Hook": {
"prefix": "uef",
"body": ["useEffect(() => {", " $1", "}, [$2]);"],
"description": "React useEffect Hook"
},
"React useReducer Hook": {
"prefix": "urd",
"body": [
"const [state, dispatch] = useReducer(($1, $2) => {",
" switch ($1) {",
" case '$3':",
" return $4;",
" default:",
" return $1;",
" }",
"}, $5);"
],
"description": "React useReducer Hook"
},
"React useMemo Hook": {
"prefix": "umm",
"body": ["const $1 = useMemo(() => {", " return $2;", "}, [$3]);"],
"description": "React useMemo Hook"
},
"React useCallback Hook": {
"prefix": "ucb",
"body": ["const $1 = useCallback(() => {", " $2", "}, [$3]);"],
"description": "React useCallback Hook"
}
}
Loading