Skip to content

Commit

Permalink
feat Adding createReactHook and createReactHookWithName snippets (#349)
Browse files Browse the repository at this point in the history
Co-authored-by: victor gakiya <victor@anymindgroup.com>
  • Loading branch information
shinobig and victor gakiya authored Aug 14, 2023
1 parent 95ebf35 commit 377d454
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions snippets/javascript/react-ts.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,16 @@
],
"description": "React useMemo() hook"
},
"createReactHook": {
"prefix": "crh",
"body": [ "export const use$0 = () => {", "", "}" ],
"description": "Create React Hook"
},
"createReactHookWithName": {
"prefix": "crhn",
"body": [ "export const ${TM_FILENAME_BASE} = () => {", "\t$0", "}"],
"description": "Create React Hook using File name"
},
"describeBlock": {
"prefix": "desc",
"body": ["describe('$1', () => {", " $0", "})", ""],
Expand Down

0 comments on commit 377d454

Please sign in to comment.