react-node-snippets
This extension provides you some of the best JavaScript snippets used by me for MERN stack. 
Installation
Visual Studio Marketplace
Launch Quick Open: 
Paste the following command and press Enter: 
ext install ej.react-node-snippets
 
GitHub Repository Clone
Change to your .vscode/extensions VS Code extensions directory.
Depending on your platform it is located in the following folders: 
- Windows: 
%USERPROFILE%\.vscode\extensions 
- Linux: 
~/.vscode/extensions 
- macOS: 
~/.vscode/extensions 
 
Clone the Github repository as ej.react-node-snippets: 
git clone https://github.com/ejekanshjain/react-node-snippets.git ej.react-node-snippets
 
Supported languages (file extensions)
Usage
JavaScript
| Prefix | 
Method | 
 
clg→ | 
Log output to console | 
 
cle→ | 
Log error to console | 
 
rq→ | 
require statement | 
 
imp→ | 
import statement | 
 
tpf→ | 
typeof variable | 
 
nfn→ | 
Creates a named function | 
 
afn→ | 
Creates an anonymous function | 
 
fre→ | 
Creates a forEach statement | 
 
 
Node
| Prefix | 
Method | 
 
expapp→ | 
Creates an express app | 
 
expapi→ | 
Creates an express api server with cors | 
 
expr→ | 
Creates an express router | 
 
exprf→ | 
Creates a full express router | 
 
exprfa→ | 
Creates a full express router with async callbacks | 
 
mc→ | 
Creates a Mongoose Connection | 
 
mm→ | 
Creates a Mongoose Model | 
 
 
React
| Prefix | 
Method | 
 
rfc→ | 
Creates a React Functional Component | 
 
rfcp→ | 
Creates a React Functional Component with props | 
 
rctx→ | 
Creates and exports React context | 
 
useState→ | 
React useState hook | 
 
useEffect→ | 
React useEffect hook | 
 
useContext→ | 
React useContext hook | 
 
useRef→ | 
React useRef hook | 
 
 
 |  |