rcc
import React, { Component } from "react";
class about extends Component {
render() {return <div></div>;}
}
export default about;
rccp
import React, { Component } from "react";
import PropTypes from "prop-types";
class about extends Component {
render() {return <div></div>;}
}
about.propTypes = {};
export default about;
rcfc
import React, { Component } from "react";
import PropTypes from "prop-types";
class about extends Component {
constructor(props) {
super(props);
}
componentWillMount() {}
componentDidMount() {}
componentWillReceiveProps(nextProps) {}
shouldComponentUpdate(nextProps, nextState) {}
componentWillUpdate(nextProps, nextState) {}
componentDidUpdate(prevProps, prevState) {}
componentWillUnmount() {}
render() {return <div></div>;}
}
about.propTypes = {};
export default about;
rscp
import React from "react";
import PropTypes from "prop-types";
const about = (props) => {
return <div></div>;
};
about.propTypes = {};
export default about;
rsi
import React from 'react';
const about = (props) => ();
export default about;
rpt about.propTypes = {};
rdp about.defaultProps = {};
conc
constructor(props, context) {
super(props, context);
}
cwm→ componentWillMount
cdm→ componentDidMount
cwr→ componentWillReceiveProps
scu→ shouldComponentUpdate
cwup→ componentWillUpdate
cdup→ componentDidUpdate
cwun→ componentWillUnmount
gsbu→ getSnapshotBeforeUpdate
gdsfp→ static getDerivedStateFromProps
cdc→ componentDidCatch
ren→ render
sst→ this.setState with object as parameter
ssf→ this.setState with function as parameter
props→ this.props
state→ this.state
bnd→ this.methodName = this.methodName.bind(this)
imr→ import React from 'react'
imrd→ import ReactDOM from 'react-dom'
imrc→ import React, { Component } from 'react'
imrcp→ import React, { Component } from 'react' & import PropTypes from 'prop-types'
imrpc→ import React, { PureComponent } from 'react'
imrpcp→ import React, { PureComponent } from 'react' & import PropTypes from 'prop-types'
imrm→ import React, { memo } from 'react'
imrmp→ import React, { memo } from 'react' & import PropTypes from 'prop-types'
impt→ import PropTypes from 'prop-types'
imrr→ import { BrowserRouter as Router, Route, NavLink} from 'react-router-dom'
imbr→ import { BrowserRouter as Router} from 'react-router-dom'
imbrc→ import { Route, Switch, NavLink, Link } from react-router-dom'
imbrr→ import { Route } from 'react-router-dom'
imbrs→ import { Switch } from 'react-router-dom'
imbrl→ import { Link } from 'react-router-dom'
imbrnl→ import { NavLink } from 'react-router-dom'
imrs→ import React, { useState } from 'react'
imrse→ import React, { useState, useEffect } from 'react'
redux→ import { connect } from 'react-redux'
rconst→ constructor(props) with this.state
rconc→ constructor(props, context) with this.state
est→ this.state = { }
cdm→ componentDidMount = () => { }
scu→ shouldComponentUpdate = (nextProps, nextState) => { }
cdup→ componentDidUpdate = (prevProps, prevState) => { }
cwun→ componentWillUnmount = () => { }
gdsfp→ static getDerivedStateFromProps(nextProps, prevState) { }
gsbu→ getSnapshotBeforeUpdate = (prevProps, prevState) => { }
ren→ render() { return( ) }
sst→ this.setState({ })
ssf→ this.setState((state, props) => return { })
props→ this.props.propName
state→ this.state.stateName
rcontext→ const ${1:contextName} = React.createContext()
cref→ this.${1:refName}Ref = React.createRef()
fref→ const ref = React.createRef()
bnd→ this.methodName = this.methodName.bind(this)