Skip to content

taufiq-dev/useful-vscode-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

Useful VSCode Snippets

  1. React Snippets

React Snippets

React arrow function component with export
Remove hypens/dashes and capitalize the words.

{
  "React arrow function component with export": {
    "prefix": ["rafce"],
    "body": [
      "const ${1:${TM_FILENAME_BASE/(\\w*)-?/${1:/capitalize}/g}} = () => {",
      "  return <>$0</>;",
      "};",
      "",
      "export default $1;",
      ""
    ],
    "description": "Create a React arrow function component with export"
  }
}

Output

// my-filename.js
const MyFilename = () => {
  return <></>;
};

export default MyFilename;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published