0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

VSCode で使う snippets

Last updated at Posted at 2021-09-19

はじめに

VSCode に登録している snippets をメモ代わりに書き残しています。
順次アップデートしていきます。

React(TypeScript)

これらを参考にしています。

typescriptreact.json
{
	"React Functional Component": {
		"prefix": "rfc",
		"body": [
			"interface Props {",
			"\t",
			"}",
			"",
			"const ${1:${TM_FILENAME_BASE}}: React.FC<Props> = (props) => {",
			"\treturn (",
			"\t\t<div>",
			"\t\t\t$0",
			"\t\t</div>",
			"\t)",
			"}",
			"",
			"export default ${1:${TM_FILENAME_BASE}}",
			""
		],
		"description": "Functional Component を作成"
	},
	"useState": {
		"prefix": "cus",
		"body": [
			"const [${1}, set${1/(.*)/${1:/capitalize}/}] = useState($2);",
		],
		"description": "useState を定義"
	},
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?