react-disposable-modal
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -31,3 +31,3 @@ "use strict"; | ||
var _rx = require("disposable-component/rx6"); | ||
var _rx = require("disposable-component/lib/rx6"); | ||
@@ -44,3 +44,3 @@ var _rx2 = _interopRequireDefault(_rx); | ||
// stateless functional components were not working correctly, so I had to make a very thin component to get state/prop changes to propagate correctly to children components | ||
// stateless functional components were not working correctly, so I had to make a very thin component to get state/prop changes to propagate correctly to children components | ||
var _Portal = function (_React$Component) { | ||
@@ -87,3 +87,3 @@ _inherits(_Portal, _React$Component); | ||
value: function componentDidUpdate() { | ||
// renderPortal() if < React16 so that state/prop changes are reflected in the DOM | ||
// renderPortal() if < React16 so that state/prop changes are reflected in the DOM | ||
if (!_reactDom2.default.createPortal) this.renderPortal(); | ||
@@ -108,3 +108,3 @@ } | ||
if (!this.parentContainer) { | ||
// we need to keep a reference to the parent DOM node for future times when this function is called | ||
// we need to keep a reference to the parent DOM node for future times when this function is called | ||
this.parentContainer = document.createElement("div"); | ||
@@ -111,0 +111,0 @@ document.body.appendChild(this.parentContainer); |
{ | ||
"name": "react-disposable-modal", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "React-disposable-modal is a reactive API for building modal components in React.", | ||
@@ -21,7 +21,7 @@ "main": "lib/disposable-modal.js", | ||
"dependencies": { | ||
"disposable-component": "^0.3.1", | ||
"react": "^16.2.0", | ||
"react-disposable-decorator": "^2.1.0", | ||
"react": "^16.2.0", | ||
"react-dom": "^16.2.0", | ||
"rx": "^4.1.0", | ||
"disposable-component": "^0.3.0" | ||
"rx": "^4.1.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "files": [ |
@@ -5,5 +5,5 @@ import React from "react"; | ||
import mountComponent from "disposable-component"; | ||
import mountDisposableComponent from "disposable-component/rx6" | ||
import mountDisposableComponent from "disposable-component/lib/rx6" | ||
// stateless functional components were not working correctly, so I had to make a very thin component to get state/prop changes to propagate correctly to children components | ||
// stateless functional components were not working correctly, so I had to make a very thin component to get state/prop changes to propagate correctly to children components | ||
class _Portal extends React.Component { | ||
@@ -26,3 +26,3 @@ render() { | ||
componentDidUpdate() { | ||
// renderPortal() if < React16 so that state/prop changes are reflected in the DOM | ||
// renderPortal() if < React16 so that state/prop changes are reflected in the DOM | ||
if(!ReactDOM.createPortal) this.renderPortal() | ||
@@ -45,5 +45,5 @@ } | ||
if(!ReactDOM.createPortal) return null; | ||
if(!this.parentContainer) { | ||
// we need to keep a reference to the parent DOM node for future times when this function is called | ||
// we need to keep a reference to the parent DOM node for future times when this function is called | ||
this.parentContainer = document.createElement("div") | ||
@@ -50,0 +50,0 @@ document.body.appendChild(this.parentContainer) |
Sorry, the diff of this file is not supported yet
21767
Updateddisposable-component@^0.3.1