Last active
June 9, 2016 12:14
-
-
Save jurosh/087120a6053317704ddd2aa22f72b83b to your computer and use it in GitHub Desktop.
React stateless component
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
// --- comps --- | |
import React from '"react"'; | |
const $component$ = () => ( | |
<div> | |
$END$ | |
</div> | |
); | |
export default $component$; | |
// --- compsprops | |
import React, {PropTypes} from '"react"'; | |
const $component$ = () => ( | |
<div> | |
$END$ | |
</div> | |
); | |
$component$.propTypes = { | |
example: PropTypes.any | |
}; | |
export default $component$; | |
// --- compc | |
import React, {PropTypes} from '"react"'; | |
import {connect} from '"react-redux"'; | |
// import * as actions from 'actions/actionTypes'; | |
@connect((state) => ({ | |
example: state.example | |
})) | |
export default class $container$ extends React.Component { | |
static propTypes = { | |
dispatch: PropTypes.func, | |
example: PropTypes.any | |
}; | |
componentDidMount () { | |
// this.props.dispatch(getCompetitionsByDate()); | |
} | |
render () { | |
// const {something} = this.props.example; | |
return ( | |
<div> | |
$END$ | |
</div> | |
); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment