Skip to content

Instantly share code, notes, and snippets.

@xincici
Last active August 29, 2015 14:15
Show Gist options
  • Save xincici/5e3bd6378ef58b6deae5 to your computer and use it in GitHub Desktop.
Save xincici/5e3bd6378ef58b6deae5 to your computer and use it in GitHub Desktop.
shorthand for reactjs plugin in sublime text 2
cdm→ componentDidMount: fn() { ... }
cdup→ componentDidUpdate: fn(pp, ps) { ... }
cs→ var cx = React.addons.classSet;
cwm→ componentWillMount: fn() { ... }
cwr→ componentWillReceiveProps: fn(np) { ... }
cwu→ componentWillUpdate: fn(np, ns) { ... }
cwun→ componentWillUnmount: fn() { ... }
cx→ cx({ ... })
fup→ forceUpdate(...)
gdp→ getDefaultProps: fn() { return {...} }
gis→ getInitialState: fn() { return {...} }
ism→ isMounted()
props→ this.props.
pt→ propTypes { ... }
rcc→ component skeleton
refs→ this.refs.
ren→ render: fn() { return ... }
scu→ shouldComponentUpdate: fn(np, ns) { ... }
sst→ this.setState({ ... })
state→ this.state.
trp→ transferPropsTo( ... )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment