Skip to content

Commit

Permalink
renderSubtreeIntoContainer + v0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Theadd committed Sep 4, 2015
1 parent 2592bc4 commit 5b4f51e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-mirror",
"version": "0.4.0",
"version": "0.4.1",
"description": "Takes control of component's rendering cycle allowing many synchronized replicas of it's DOM",
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions src/replicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class Replicator extends Component {
!this._ghost && (this._ghost = document.createElement('div'))
this._master.parentNode.appendChild(this._ghost)
this._ghost.appendChild(this._imprint)
React.render(this._element, this._imprint)
React.unstable_renderSubtreeIntoContainer(this, this._element, this._imprint)
this._master.parentNode.removeChild(this._ghost)
this._master.appendChild(this._ghost.firstChild)

Expand All @@ -132,13 +132,13 @@ class Replicator extends Component {
(mirror.style.pointerEvents = 'none')
))
} else if (this._keepInSync) {
React.render(this._element, this._imprint)
React.unstable_renderSubtreeIntoContainer(this, this._element, this._imprint)
}
this.observe(true)
}

getDOMNode (sync) {
return ((sync || (sync == null && !this._imprint.children.length)) && React.render(this._element, this._imprint), this._imprint)
return ((sync || (sync == null && !this._imprint.children.length)) && React.unstable_renderSubtreeIntoContainer(this, this._element, this._imprint), this._imprint)
}

}
Expand Down

0 comments on commit 5b4f51e

Please sign in to comment.