Skip to content

Commit

Permalink
Replace render with renderSubstree.
Browse files Browse the repository at this point in the history
To avoid future issues with portals.
  • Loading branch information
srph committed Nov 3, 2015
1 parent 5381b96 commit b75f4c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/components/Modal/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { PropTypes } from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { unstable_renderSubtreeIntoContainer, unmountComponentAtNode } from 'react-dom';
import { addClass, removeClass } from '../../utils/DomUtils';

const MODAL_BODY_CLASS = 'modal-body';
Expand Down Expand Up @@ -75,7 +75,8 @@ export default class Modal extends React.Component {
// Move to another function
addClass(document.body, MODAL_BODY_CLASS);

this.$modal = render(
this.$modal = unstable_renderSubtreeIntoContainer(
this,
<div>
<div className={MODAL_BACKDROP_CLASS} />
{this.props.children}
Expand Down

0 comments on commit b75f4c1

Please sign in to comment.