Skip to content

Instantly share code, notes, and snippets.

@scottdomes
Created December 20, 2016 01:17
Show Gist options
  • Save scottdomes/35e739f94d338031acea59c04de42fbd to your computer and use it in GitHub Desktop.
Save scottdomes/35e739f94d338031acea59c04de42fbd to your computer and use it in GitHub Desktop.
import React, { Component } from 'react'
export default class ListItem extends Component {
shouldComponentUpdate(nextProps, nextState) {
return nextProps.text !== this.props.text
}
render() {
let { text } = this.props
return <li>{text}</li>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment