@squadette/react-displace
Advanced tools
Comparing version 2.4.0-pre1 to 2.4.0-pre2
@@ -42,22 +42,10 @@ 'use strict'; | ||
function Displaced() { | ||
var _ref; | ||
var _temp, _this2, _ret; | ||
_classCallCheck(this, Displaced); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
return _ret = (_temp = (_this2 = _possibleConstructorReturn(this, (_ref = Displaced.__proto__ || Object.getPrototypeOf(Displaced)).call.apply(_ref, [this].concat(args))), _this2), _this2.renderDisplaced = function () { | ||
ReactDOM.unstable_renderSubtreeIntoContainer(_this2, React.createElement(WrappedComponent, _this2.props, _this2.props.children), _this2.container); | ||
}, _this2.removeDisplaced = function () { | ||
ReactDOM.unmountComponentAtNode(_this2.container); | ||
}, _temp), _possibleConstructorReturn(_this2, _ret); | ||
return _possibleConstructorReturn(this, (Displaced.__proto__ || Object.getPrototypeOf(Displaced)).apply(this, arguments)); | ||
} | ||
_createClass(Displaced, [{ | ||
key: 'componentWillMount', | ||
value: function componentWillMount() { | ||
key: 'componentDidMount', | ||
value: function componentDidMount() { | ||
this.container = function () { | ||
@@ -64,0 +52,0 @@ if (!options.renderTo) { |
{ | ||
"name": "@squadette/react-displace", | ||
"version": "2.4.0-pre1", | ||
"version": "2.4.0-pre2", | ||
"description": "A higher order component that displaces your component into a remote region of the DOM", | ||
@@ -5,0 +5,0 @@ "main": "dist/displace.js", |
@@ -24,3 +24,3 @@ 'use strict'; | ||
componentWillMount() { | ||
componentDidMount() { | ||
this.container = (() => { | ||
@@ -45,14 +45,2 @@ if (!options.renderTo) { | ||
renderDisplaced = () => { | ||
ReactDOM.unstable_renderSubtreeIntoContainer( | ||
this, | ||
React.createElement(WrappedComponent, this.props, this.props.children), | ||
this.container | ||
); | ||
}; | ||
removeDisplaced = () => { | ||
ReactDOM.unmountComponentAtNode(this.container); | ||
}; | ||
render() { | ||
@@ -59,0 +47,0 @@ if (this.props.mounted === false) { |
8
24888
365