renderThings () {
return this.props.things.map(thing => {
return <li>{thing.name}</li>
})
},
render () {
return (
<ul>
{ this.renderThings() }
</ul>
)
}
vs
render () {
const { props } = this
return (
<ul>
{ _renderThings(props) }
</ul>
)
}
}
function _renderThings (props) {
return this.props.things.map(thing => {
return <li>{thing.name}</li>
})
}