Created
March 2, 2018 13:29
-
-
Save munyari/20960ae1370062a8dab85b5fd8062706 to your computer and use it in GitHub Desktop.
Some ultisnips snippets for react in typescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snippet cdm | |
componentDidMount() { | |
${0} | |
} | |
snippet cdup | |
componentDidUpdate(${1:prevProps,} ${2:prevState}) { | |
${0} | |
} | |
snippet cwm | |
componentWillMount() { | |
${0} | |
} | |
snippet cwr | |
componentWillMount(${1:prevProps}) { | |
${0} | |
} | |
snippet cwun | |
componentWillUnmount() { | |
${0} | |
} | |
snippet cwup | |
componentWillUpdate(${1:nextProps,} ${2:nextState}) { | |
${0} | |
} | |
snippet scup | |
shoulcComponentUpdate(${1:nextProps,} ${2:nextState}) { | |
${0} | |
} | |
snippet ren | |
render() { | |
return ( | |
${1:<div />} | |
); | |
} | |
snippet cc | |
class ${1:MyComponent} extends Component { | |
render() { | |
return ( | |
${2:<div />} | |
); | |
} | |
} | |
snippet sfc | |
${1:MyComponent}() { | |
return ( | |
${2:<div />} | |
); | |
} | |
snippet prp | |
this.props.{$1} | |
snippet stt | |
this.state.{$1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment