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;