Create a gist now

Instantly share code, notes, and snippets.

Embed
React Component Sublime Snippet
<snippet>
<content><![CDATA[import React, { Component } from 'react'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
const mapStateToProps = (state, ownProps) => {
return {
location: ownProps.location
}
}
class ${1:MyComponent} extends Component {
render() {
return (
<div className="$1">
</div>
)
}
}
export default withRouter(connect(mapStateToProps)($1))
]]></content>
<tabTrigger>rcomp</tabTrigger>
<scope>source.js,source.jsx</scope>
<description>React Component boilerplate</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment