Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Kosmin/32ad4824e9e56626470c765da736135f to your computer and use it in GitHub Desktop.
Save Kosmin/32ad4824e9e56626470c765da736135f to your computer and use it in GitHub Desktop.
Regular Component with Pure Render and Immutable.JS
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