Less re-rendering

This commit is contained in:
Eugen Rochko 2017-01-23 21:40:48 +01:00
parent 434cf8237e
commit 8aab692034
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import { closeModal } from '../../../actions/modal';
import Lightbox from '../../../components/lightbox';
import ImageLoader from 'react-imageloader';
import LoadingIndicator from '../../../components/loading_indicator';
import PureRenderMixin from 'react-addons-pure-render-mixin';
const mapStateToProps = state => ({
url: state.getIn(['modal', 'url']),
@ -46,6 +47,8 @@ const Modal = React.createClass({
onOverlayClicked: React.PropTypes.func
},
mixins: [PureRenderMixin],
render () {
const { url, ...other } = this.props;