Skip to content

Latest commit

 

History

History
112 lines (89 loc) · 5.27 KB

vscode-extensions.md

File metadata and controls

112 lines (89 loc) · 5.27 KB

VS Code Extensions

List of my favorite VS Code extensions for React and Javascript.

Prettier

Prettier is a JavaScript, TypeScript and CSS formatting for VSCode with ESLint integration.

https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode

Reactjs Code Snippets

This extension contains code snippets for Reactjs and is based on the awesome babel-sublime-snippets package.

  • rcc: creates a new react class component

ES7 React/Redux/GraphQL/React-Native snippets

This extension provides you JavaScript and React/Redux snippets in ES7 with Babel plugin features for VS Code.

https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets

  • cpconst { } = this.props
  • csconst { } = this.state
  • imrimport React from 'react'
  • imrdimport ReactDOM from 'react-dom'
  • imrcimport React, { Component } from 'react'
  • imrcpimport React, { Component } from 'react' & import PropTypes from 'prop-types'
  • imrpcimport React, { PureComponent } from 'react'
  • imrpcpimport React, { PureComponent } from 'react' & import PropTypes from 'prop-types'
  • imrmimport React, { memo } from 'react'
  • imrmpimport React, { memo } from 'react' & import PropTypes from 'prop-types'
  • imptimport PropTypes from 'prop-types'
  • imrrimport { BrowserRouter as Router, Route, NavLink} from 'react-router-dom'
  • imbrimport { BrowserRouter as Router} from 'react-router-dom'
  • imbrcimport { Route, Switch, NavLink, Link } from react-router-dom'
  • imbrrimport { Route } from 'react-router-dom'
  • imbrsimport { Switch } from 'react-router-dom'
  • imbrlimport { Link } from 'react-router-dom'
  • imbrnlimport { NavLink } from 'react-router-dom'
  • imrsimport React, { useState } from 'react'
  • imrseimport React, { useState, useEffect } from 'react'
  • reduximport { connect } from 'react-redux'
  • rconstconstructor(props) with this.state
  • rconcconstructor(props, context) with this.state
  • estthis.state = { }
  • cwmcomponentWillMount = () => { } DEPRECATED!!!
  • cdmcomponentDidMount = () => { }
  • cwrcomponentWillReceiveProps = (nextProps) => { } DEPRECATED!!!
  • scushouldComponentUpdate = (nextProps, nextState) => { }
  • cwupcomponentWillUpdate = (nextProps, nextState) => { } DEPRECATED!!!
  • cdupcomponentDidUpdate = (prevProps, prevState) => { }
  • cwuncomponentWillUnmount = () => { }
  • gdsfpstatic getDerivedStateFromProps(nextProps, prevState) { }
  • gsbugetSnapshotBeforeUpdate = (prevProps, prevState) => { }
  • renrender() { return( ) }
  • sstthis.setState({ })
  • ssfthis.setState((state, props) => return { })
  • propsthis.props.propName
  • statethis.state.stateName
  • rcontextconst ${1:contextName} = React.createContext()
  • crefthis.${1:refName}Ref = React.createRef()
  • frefconst ref = React.createRef()
  • bndthis.methodName = this.methodName.bind(this)

React PropTypes Intellisense

The extension finds React PropTypes and adds them to the suggestion list.

https://marketplace.visualstudio.com/items?itemName=OfHumanBondage.react-proptypes-intellisense

Auto Import

Automatically finds, parses and provides code actions and code completion for all available imports. Works with JavaScript (ES6) and TypeScript (TS).

https://marketplace.visualstudio.com/items?itemName=NuclleaR.vscode-extension-auto-import

Auto Close Tag

Automatically add HTML/XML close tag, same as Visual Studio IDE or Sublime Text does.

https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag

Auto Rename Tag

Automatically rename paired HTML/XML tag, same as Visual Studio IDE does.

https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag

ESLint

Checks the most common types of errors as you write.

https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

Sort Imports

Sort ES6 imports for JavaScript and TypeScript automatically.

https://marketplace.visualstudio.com/items?itemName=amatiasq.sort-imports

Exports Autocomplete

Collects ES6 exports from your project and autocompletes them. Upon completion, item is also imported using a relative path. Import is placed after last import in that file.

https://marketplace.visualstudio.com/items?itemName=capaj.vscode-exports-autocomplete

Lorem Ipsum

Generates and inserts lorem ipsum text into Visual Studio Code.

  • Press F1 type lorem ipsum and select to insert either a line or paragraph.

https://marketplace.visualstudio.com/items?itemName=Tyriar.lorem-ipsum