Created
February 12, 2023 09:18
-
-
Save ryuichi24/471d7b8afedab45adc582a0bb8e0fcc0 to your computer and use it in GitHub Desktop.
Revisions
-
ryuichi24 created this gist
Feb 12, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ { "console.log": { "prefix": "clg", "body": ["console.log($1)"] }, "template for React Function Component": { "prefix": "rf", "body": [ "import React from 'react'", "", "type ${TM_FILENAME_BASE}Props = {", "$1", "}", "", "export const $TM_FILENAME_BASE: React.FC<${TM_FILENAME_BASE}Props> = ({$2}) => {", "\t\treturn (<>${TM_FILENAME_BASE}</>);", "}" ], "description": "Typescript React Function Component" }, "template for useState": { "prefix": "us", "body": ["const [$1, set${1/(.)/${1:/upcase}/}] = useState<$2>($3);"] }, "template for export all": { "prefix": "ex", "description": "export statement to export all items from module", "body": [ "export * from \"$1\";", "" ] } }