For vscode snippet docs: what are snippets, create a snippet, syntax
For vscode snippet docs: what are snippets, create a snippet, syntax
! Creates a template for a React Functional Component! (TS-> with props, JS-> without)
With the name of the file as the component name!
! Simliar to comp, this creates a React hook
With the name of the file! (a hook file should of course be useMyHook, i.e the same name as the hoook)
! creates a more neat useEffect snippet, without a built-in cleanup
! Lets you first write the path from which you want to import, and only afterwards the content you're importing! (that way you should have vscode's intelisense for completion)
Creates the snippet
(()=>{$cursor_is_here})();
Note: lately anonymous async functions are (happily) not useful, so you may not understand why.
For more info about each one, go see ./snippets.jsonc!
- press
ctrl
+shift
+p
- write "configure user snippets"
- select the relevant option to create a new global snippets file
It's a console log snippet that is also keybinded to ctrl+shift+c