diff --git a/package.json b/package.json
index 28310536..2d0158a1 100644
--- a/package.json
+++ b/package.json
@@ -47,8 +47,8 @@
"karma-webpack": "^2.0.4",
"mocha": "3.5.3",
"npm-run-all": "^4.1.1",
- "react": "^16",
- "react-dom": "^16",
+ "react": "^16.0.0",
+ "react-dom": "^16.0.0",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"should": "^13.1.0",
diff --git a/src/components/Modal.js b/src/components/Modal.js
index 027669b9..5a914e4b 100644
--- a/src/components/Modal.js
+++ b/src/components/Modal.js
@@ -105,6 +105,10 @@ export default class Modal extends Component {
componentDidMount() {
if (!canUseDOM) return;
+
+ if (!isReact16) {
+ this.node = document.createElement('div');
+ }
this.node.className = this.props.portalClassName;
const parent = getParentElement(this.props.parentSelector);
@@ -164,7 +168,7 @@ export default class Modal extends Component {
}
portalRef = ref => { this.portal = ref; }
-
+
renderPortal = props => {
const portal = createPortal(this, (
@@ -177,10 +181,10 @@ export default class Modal extends Component {
return null;
}
- if (!this.node) {
+ if (!this.node && isReact16) {
this.node = document.createElement('div');
}
-
+
return createPortal(