@@ -60,48 +60,48 @@ I.E. `tsrcc`
60
60
61
61
## React
62
62
63
- | Prefix | Method |
64
- | ----------: | -------------------------------------------------------------------------------------- |
65
- | ` imr→ ` | ` import React from 'react' ` |
66
- | ` imrd→ ` | ` import ReactDOM from 'react-dom' ` |
67
- | ` imrc→ ` | ` import React, { Component } from 'react' ` |
68
- | ` imrcp→ ` | ` import React, { Component } from 'react' & import PropTypes from 'prop-types' ` |
69
- | ` imrpc→ ` | ` import React, { PureComponent } from 'react' ` |
70
- | ` imrpcp→ ` | ` import React, { PureComponent } from 'react' & import PropTypes from 'prop-types' ` |
71
- | ` imrm→ ` | ` import React, { memo } from 'react' ` |
72
- | ` imrmp→ ` | ` import React, { memo } from 'react' & import PropTypes from 'prop-types' ` |
73
- | ` impt→ ` | ` import PropTypes from 'prop-types' ` |
74
- | ` imrr→ ` | ` import { BrowserRouter as Router, Route, NavLink} from 'react-router-dom' ` |
75
- | ` imbr→ ` | ` import { BrowserRouter as Router} from 'react-router-dom' ` |
76
- | ` imbrc→ ` | ` import { Route, Switch, NavLink, Link } from react-router-dom' ` |
77
- | ` imbrr→ ` | ` import { Route } from 'react-router-dom' ` |
78
- | ` imbrs→ ` | ` import { Switch } from 'react-router-dom' ` |
79
- | ` imbrl→ ` | ` import { Link } from 'react-router-dom' ` |
80
- | ` imbrnl→ ` | ` import { NavLink } from 'react-router-dom' ` |
81
- | ` imrs→ ` | ` import React, { useState } from 'react' ` |
82
- | ` imrse→ ` | ` import React, { useState, useEffect } from 'react' ` |
83
- | ` redux→ ` | ` import { connect } from 'react-redux' ` |
84
- | ` rconst→ ` | ` constructor(props) with this.state ` |
85
- | ` rconc→ ` | ` constructor(props, context) with this.state ` |
86
- | ` est→ ` | ` this.state = { } ` |
87
- | ` cwm→ ` | ` componentWillMount = () => { } ` DEPRECATED!!! |
88
- | ` cdm→ ` | ` componentDidMount = () => { } ` |
89
- | ` cwr→ ` | ` componentWillReceiveProps = (nextProps) => { } ` DEPRECATED!!! |
90
- | ` scu→ ` | ` shouldComponentUpdate = (nextProps, nextState) => { } ` |
91
- | ` cwup→ ` | ` componentWillUpdate = (nextProps, nextState) => { } ` DEPRECATED!!! |
92
- | ` cdup→ ` | ` componentDidUpdate = (prevProps, prevState) => { } ` |
93
- | ` cwun→ ` | ` componentWillUnmount = () => { } ` |
94
- | ` gdsfp→ ` | ` static getDerivedStateFromProps(nextProps, prevState) { } ` |
95
- | ` gsbu→ ` | ` getSnapshotBeforeUpdate = (prevProps, prevState) => { } ` |
96
- | ` ren→ ` | ` render() { return( ) } ` |
97
- | ` sst→ ` | ` this.setState({ }) ` |
98
- | ` ssf→ ` | ` this.setState((state, props) => return { }) ` |
99
- | ` props→ ` | ` this.props.propName ` |
100
- | ` state→ ` | ` this.state.stateName ` |
101
- | ` rcontext→ ` | ` const ${1:contextName} = React.createContext() ` |
102
- | ` cref→ ` | ` this.${1:refName}Ref = React.createRef() ` |
103
- | ` fref→ ` | ` const ref = React.createRef() ` |
104
- | ` bnd→ ` | ` this.methodName = this.methodName.bind(this) ` |
63
+ | Prefix | Method |
64
+ | ----------: | ----------------------------------------------------------------------------------- |
65
+ | ` imr→ ` | ` import React from 'react' ` |
66
+ | ` imrd→ ` | ` import ReactDOM from 'react-dom' ` |
67
+ | ` imrc→ ` | ` import React, { Component } from 'react' ` |
68
+ | ` imrcp→ ` | ` import React, { Component } from 'react' & import PropTypes from 'prop-types' ` |
69
+ | ` imrpc→ ` | ` import React, { PureComponent } from 'react' ` |
70
+ | ` imrpcp→ ` | ` import React, { PureComponent } from 'react' & import PropTypes from 'prop-types' ` |
71
+ | ` imrm→ ` | ` import React, { memo } from 'react' ` |
72
+ | ` imrmp→ ` | ` import React, { memo } from 'react' & import PropTypes from 'prop-types' ` |
73
+ | ` impt→ ` | ` import PropTypes from 'prop-types' ` |
74
+ | ` imrr→ ` | ` import { BrowserRouter as Router, Route, NavLink} from 'react-router-dom' ` |
75
+ | ` imbr→ ` | ` import { BrowserRouter as Router} from 'react-router-dom' ` |
76
+ | ` imbrc→ ` | ` import { Route, Switch, NavLink, Link } from react-router-dom' ` |
77
+ | ` imbrr→ ` | ` import { Route } from 'react-router-dom' ` |
78
+ | ` imbrs→ ` | ` import { Switch } from 'react-router-dom' ` |
79
+ | ` imbrl→ ` | ` import { Link } from 'react-router-dom' ` |
80
+ | ` imbrnl→ ` | ` import { NavLink } from 'react-router-dom' ` |
81
+ | ` imrs→ ` | ` import React, { useState } from 'react' ` |
82
+ | ` imrse→ ` | ` import React, { useState, useEffect } from 'react' ` |
83
+ | ` redux→ ` | ` import { connect } from 'react-redux' ` |
84
+ | ` rconst→ ` | ` constructor(props) with this.state ` |
85
+ | ` rconc→ ` | ` constructor(props, context) with this.state ` |
86
+ | ` est→ ` | ` this.state = { } ` |
87
+ | ` cwm→ ` | ` componentWillMount = () => { } ` DEPRECATED!!! |
88
+ | ` cdm→ ` | ` componentDidMount = () => { } ` |
89
+ | ` cwr→ ` | ` componentWillReceiveProps = (nextProps) => { } ` DEPRECATED!!! |
90
+ | ` scu→ ` | ` shouldComponentUpdate = (nextProps, nextState) => { } ` |
91
+ | ` cwup→ ` | ` componentWillUpdate = (nextProps, nextState) => { } ` DEPRECATED!!! |
92
+ | ` cdup→ ` | ` componentDidUpdate = (prevProps, prevState) => { } ` |
93
+ | ` cwun→ ` | ` componentWillUnmount = () => { } ` |
94
+ | ` gdsfp→ ` | ` static getDerivedStateFromProps(nextProps, prevState) { } ` |
95
+ | ` gsbu→ ` | ` getSnapshotBeforeUpdate = (prevProps, prevState) => { } ` |
96
+ | ` ren→ ` | ` render() { return( ) } ` |
97
+ | ` sst→ ` | ` this.setState({ }) ` |
98
+ | ` ssf→ ` | ` this.setState((state, props) => return { }) ` |
99
+ | ` props→ ` | ` this.props.propName ` |
100
+ | ` state→ ` | ` this.state.stateName ` |
101
+ | ` rcontext→ ` | ` const ${1:contextName} = React.createContext() ` |
102
+ | ` cref→ ` | ` this.${1:refName}Ref = React.createRef() ` |
103
+ | ` fref→ ` | ` const ref = React.createRef() ` |
104
+ | ` bnd→ ` | ` this.methodName = this.methodName.bind(this) ` |
105
105
106
106
## React Hooks
107
107
@@ -159,11 +159,11 @@ I.E. `tsrcc`
159
159
| ` ptypes→ ` | ` static propTypes = {} ` |
160
160
161
161
## GraphQL
162
- | Prefix | Method |
163
- | --------: | ----------------------------------- |
164
- | ` graphql→ ` | ` import { compose, graphql } from react-apollo' ` |
165
- | ` expgql-> ` | ` export default compose(graphql($1, { name: $2 }))($3) ` |
166
162
163
+ | Prefix | Method |
164
+ | ---------: | ------------------------------------------------------- |
165
+ | ` graphql→ ` | ` import { compose, graphql } from react-apollo' ` |
166
+ | ` expgql-> ` | ` export default compose(graphql($1, { name: $2 }))($3) ` |
167
167
168
168
## Console
169
169
0 commit comments