Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Extra React snippetsNew to Visual Studio Code? Get it now.
Extra React snippets

Extra React snippets

Khoi Le

|
739 installs
| (1) | Free
Code snippets for Javascript and React
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Extra React code snippets

Download on Visual Studio Marketplace

This extension is lightweight and you don't need remember all prefixes because Visual Studio Code IntelliSense is very smart and powerful.

Features

You start type rr to use code template blocks or imp, csl, handle, event, etc. for using short statements. Type whatever you remember then you can see many snippets in code completion.

React

Prefix (rr) Description
rrImpHooks Import basic React Hooks
rrFunction Create a function with ES7 syntax
rrComponent Create a simple component with React Hooks
rrStatelessFunctionalComponent Create stateless functional component
rrReturnElement Return an HTML element

JavaScript

Prefix Description
imp Import from another module
impd Import default from another module
expd Export default statement
eventpr Completion for event.preventDefault()
eventst Completion for event.stopPropagation()
handleAction Create handleAction() method with ES7 syntax
jsPromise Generates a full Promise function
jsReturnPromise Generates a return for a Promise function
jsFetchGET Fetch by using GET method
jsFetch Fetch by using options

Console

Prefix Description
csl console.log()
cst console.table()
csw console.warn()
cse console.error()

Other

Prefix Description
mep Declare module.exports statement

Enjoy coding and free your mind! (^_^)

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft