Last active
November 17, 2021 15:53
-
-
Save klzns/6a3edeed3ec81282e1daecba55c43372 to your computer and use it in GitHub Desktop.
Snippet to create React components fast, just typing `reactFunc`
This file contains 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 characters
{ | |
"React Function Component": { | |
"description": "Write basic React component", | |
"prefix": "reactFunc", | |
"body": [ | |
"import React from 'react'", | |
"import 'twin.macro'", | |
"", | |
"type ${1:${TM_FILENAME_BASE}}Props = {", | |
" $2", | |
"}", | |
"", | |
"export function ${1:${TM_FILENAME_BASE}}({ $3 }: ${1:${TM_FILENAME_BASE}}Props) {", | |
" ", | |
" return (", | |
" $4", | |
" )", | |
"}", | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment