Last active
November 13, 2020 21:06
-
-
Save georgekrax/723d39defcd3ac9241be6412bd5e996a to your computer and use it in GitHub Desktop.
VS Code Snippets for TypeScript React & Next.js
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 characters
{ | |
"TS React Dual Export": { | |
"prefix": "rfac", | |
"body": [ | |
"import React from \"react\"", | |
"", | |
"export type Props = {", | |
"", | |
"}", | |
"", | |
"export const $TM_FILENAME_BASE: React.FC<Props> = () => {", | |
"\treturn (", | |
"\t\t<div>", | |
"", | |
"\t\t</div>", | |
"\t);", | |
"};", | |
"", | |
"export default $TM_FILENAME_BASE;" | |
], | |
"description": "Creates a React Arrow Function Component with ES7 module system & default export (custom snippet)" | |
}, | |
"TS Next.js Component": { | |
"prefix": "rfacn", | |
"body": [ | |
"type Props = {", | |
"", | |
"}", | |
"", | |
"const $TM_FILENAME_BASE: React.FC<Props> = () => {", | |
"\treturn (", | |
"\t\t<div>", | |
"", | |
"\t\t</div>", | |
"\t);", | |
"};", | |
"", | |
"export default $TM_FILENAME_BASE;" | |
], | |
"description": "Creates a Next.js (React) Arrow Function Component with default export (custom snippet)" | |
} | |
} |
Author
georgekrax
commented
Oct 29, 2020
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment