Browse Source

Less re-rendering

closed-social-v3
Eugen Rochko 7 years ago
parent
commit
8aab692034
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      app/assets/javascripts/components/features/ui/containers/modal_container.jsx

+ 3
- 0
app/assets/javascripts/components/features/ui/containers/modal_container.jsx View File

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

Loading…
Cancel
Save