Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>reactjs-snippets-by-yuvNew to Visual Studio Code? Get it now.
reactjs-snippets-by-yuv

reactjs-snippets-by-yuv

Rakesh Sinha

|
735 installs
| (4) | Free
Simple React snippet generator
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

reactjs-snippets-by-yuv README

Release Notes

1.0.2

All Setup Fixes

1.0.1

Updated Vscode Version

1.0.0

Initial release of Simple React Snippet


Basic Methods

Prefix Method
imp→ import moduleName from 'module'
imn→ import 'module'
imd→ import { destructuredModule } from 'module'
ime→ import * as alias from 'module'
exp→ export default moduleName
enf→ export named function
edfn→ export Default Function
edf→ export Default ALL
arw→ arrowFunction = (params) => { }
fof→ for(let itemName of objectName { }
fre→ for(let itemName in objectName { }
clg→ console.log();
conc→ console with options
sti→ setInterval(() => { }, intervalTime
sto→ setTimeout(() => { }, delayTime
imrc→ import React, { Component }
imrd import React-DOM
wrrd import React-Router-DOM
rrd→ import Browser-Router
hks→ Import Hooks Component
cmp→ import Component
cnt→ import Container
useEffect→ useEffect
ftch→ firebase fetch-Function
sts→ Set State
cwm→ componentWillMount
cdm→ componentDidMount
cwr→ componentWillReceiveProps
gsb→ getSNapshotBeforeUpdate
gds→ getDerivedStateFromProps
ren→ componentRender
hoc→ hocComponent
cls→ reactClassCompoment
if→ if condition
update→ firebase update- function
set→ const { } = this.state
map→ Array map method()
filter→ Array filter method()

Enjoy!

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