1 | import React, {PropTypes, Component} from 'react'
|
2 | import {addons} from 'react/addons'
|
3 | import styles from './index.css'
|
4 | const {shouldComponentUpdate} = addons.PureRenderMixin
|
5 |
|
6 | export default class {{PascalName}} extends Component {
|
7 | static propTypes = {
|
8 | name: PropTypes.string.isRequired
|
9 | }
|
10 | static defaultProps = {
|
11 | name: '{{titleName}}'
|
12 | }
|
13 | constructor (props) {
|
14 | super(props)
|
15 |
|
16 | this.state = {}
|
17 | }
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | shouldComponentUpdate (...args) {
|
23 | return shouldComponentUpdate.apply(this, args)
|
24 | }
|
25 | render () {
|
26 | return (<div>
|
27 | <h1 className={styles.title} ref="title">{this.props.name} component</h1>
|
28 | <img src={`http://loremflickr.com/600/600/${this.props.name}`} alt={this.props.name} />
|
29 | </div>)
|
30 | }
|
31 | }
|
32 |
|
33 |
|
\ | No newline at end of file |