Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>React Node SnippetsNew to Visual Studio Code? Get it now.
React Node Snippets

React Node Snippets

Ekansh Jain

|
3,596 installs
| (1) | Free
This extension provides you some of the best JavaScript snippets used by me for MERN stack.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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:

  • Windows: Ctrl+P
  • Linux: Ctrl+P
  • macOS: ⌘P

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)

  • JavaScript (.js)

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
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft