Last active
March 7, 2017 23:27
-
-
Save Kosmin/32ad4824e9e56626470c765da736135f to your computer and use it in GitHub Desktop.
Regular Component with Pure Render and Immutable.JS
This file contains hidden or 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, { PropTypes, Component } from 'react'; | |
class Car extends Component { | |
shouldComponentUpdate(nextProps) { | |
return this.props.details === nextProps.details; | |
} | |
render() { | |
return ( | |
<div> | |
{`Your object: ${details.name} ${details.color}`} | |
</div> | |
); | |
} | |
} | |
export default Car; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment