Skip to content

Instantly share code, notes, and snippets.

@MrDesjardins
Created January 8, 2024 05:26
Show Gist options
  • Save MrDesjardins/fc5981e7ab4dc6a7a9c704f0d543fbe1 to your computer and use it in GitHub Desktop.
Save MrDesjardins/fc5981e7ab4dc6a7a9c704f0d543fbe1 to your computer and use it in GitHub Desktop.
VsCode Snippet New React Component
"newrc": {
"prefix": ["newrc", "new-react-component"],
"body": ["import style from \"./${1/(.*)/${1:/capitalize}/}.module.css\";",
"export const ${1/(.*)/${1:/capitalize}/} = () => {",
" return <div className={style.${1/(.*)/${1:/capitalize}/}}>${1/(.*)/${1:/capitalize}/}</div>;",
"};"]
"description": "Create a new React component with its CSS module file import"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment