Created
August 29, 2015 01:10
-
-
Save gurel/38439e71b86b663cda38 to your computer and use it in GitHub Desktop.
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
import React from "react" | |
// ReadMe: | |
// React Lifecycle => https://facebook.github.io/react/docs/component-specs.html | |
// ES6 Transform => http://babeljs.io/blog/2015/06/07/react-on-es6-plus/ | |
export default class ${NAME} extends React.Component { | |
displayName: "${NAME}" | |
static propTypes = { | |
// ... | |
} | |
state = { | |
// ... | |
} | |
static defaultProps = { | |
// .. | |
} | |
constructor(props) { | |
super(props); | |
// Operations usually carried out in componentWillMount go here | |
} | |
componentDidMount(){ } | |
componentWillReceiveProps(/*object*/ nextProps){ } | |
shouldComponentUpdate(/*object*/ nextProps, /*object*/ nextState){ | |
// return Boolean | |
} | |
componentWillUpdate(/*object*/ nextProps, /*object*/ nextState){ } | |
componentDidUpdate(/*object*/ prevProps, /*object*/ prevState){ } | |
componentWillUnmount(){ | |
} | |
render(){ | |
var { | |
className, | |
...others, | |
} = this.props; | |
return ( | |
<div className={className} {...others} > | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment