From a7e24047398a768281cb40c696a739a7db23b449 Mon Sep 17 00:00:00 2001 From: Brad Estey Date: Fri, 30 Oct 2015 21:58:07 -0400 Subject: [PATCH] Use ReactDOM for unmountComponentAtNode. Fixes this warning: React.unmountComponentAtNode is deprecated. Please use ReactDOM.unmountComponentAtNode from require('react-dom') instead. --- src/creators/OverlayViewCreator.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/creators/OverlayViewCreator.js b/src/creators/OverlayViewCreator.js index ee478b9b..33d59231 100644 --- a/src/creators/OverlayViewCreator.js +++ b/src/creators/OverlayViewCreator.js @@ -4,6 +4,7 @@ import { Component, Children, } from "react"; +import ReactDOM from "react-dom"; import {default as invariant} from "invariant"; import {default as defaultPropsCreator} from "../utils/defaultPropsCreator"; @@ -53,7 +54,7 @@ export default class OverlayViewCreator extends Component { }; overlayView.onRemove = function () { - React.unmountComponentAtNode(this._containerElement); + ReactDOM.unmountComponentAtNode(this._containerElement); this._unmountContainerFromPane(); this._containerElement = null; };