From abc3473a1cf1b0dc561a951a09cdcbcbaeb606db Mon Sep 17 00:00:00 2001 From: a-honey Date: Thu, 2 Jan 2025 21:37:39 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20.vscode=20=ED=8F=B4=EB=8D=94=20.gi?= =?UTF-8?q?tignore=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9fab9b0..86b4992 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ dist-ssr *.local # Editor directories and files -.vscode/* !.vscode/extensions.json .idea .DS_Store From 127e645e57f53f485377f9632ab9b69b82dbddfd Mon Sep 17 00:00:00 2001 From: a-honey Date: Thu, 2 Jan 2025 21:37:59 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20=EB=A6=AC=EC=95=A1=ED=8A=B8=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=8A=A4=EB=8B=88=ED=8E=AB=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/react.code-snippets | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .vscode/react.code-snippets diff --git a/.vscode/react.code-snippets b/.vscode/react.code-snippets new file mode 100644 index 0000000..9ec9155 --- /dev/null +++ b/.vscode/react.code-snippets @@ -0,0 +1,53 @@ +{ + "Print React Component": { + "prefix": "rcc", + "body": [ + "import React from 'react';", + "", + "const $1 = () => {", + " return (", + "
", + " $2", + "
", + " );", + "};", + "", + "export default $1;" + ], + "description": "Create a React functional component" + }, + "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" + } +} From fdd27b458df7153871b5f7f027893fef53fd4763 Mon Sep 17 00:00:00 2001 From: a-honey Date: Thu, 2 Jan 2025 21:42:31 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20export=20default=20function=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/react.code-snippets | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.vscode/react.code-snippets b/.vscode/react.code-snippets index 9ec9155..3128ecb 100644 --- a/.vscode/react.code-snippets +++ b/.vscode/react.code-snippets @@ -1,9 +1,7 @@ { - "Print React Component": { + "React Component (Arrow Function)": { "prefix": "rcc", "body": [ - "import React from 'react';", - "", "const $1 = () => {", " return (", "
", @@ -14,7 +12,19 @@ "", "export default $1;" ], - "description": "Create a React functional component" + "description": "Create a React functional component using arrow function" + }, + "React Component (Function Declaration)": { + "prefix": "rcf", + "body": [ + "export default function $1 () {", + " return (", + "
", + "
", + " );", + "};" + ], + "description": "Create a React functional component using function declaration" }, "React useState Hook": { "prefix": "usf",