From bfae1190da6bd479f99550207805bc6c3d7704ef Mon Sep 17 00:00:00 2001 From: George Kronberg Date: Fri, 16 Oct 2015 00:46:45 -0700 Subject: [PATCH] Update 05-wrapping-dom-libs.md https://facebook.github.io/react/blog/2014/10/28/react-v0.12.html "To align with render methods in your component classes, we decided to keep the top-level functions short and sweet. React.renderComponent is now React.render." --- lessons/05-wrapping-dom-libs.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lessons/05-wrapping-dom-libs.md b/lessons/05-wrapping-dom-libs.md index d605a1b..f6a5441 100644 --- a/lessons/05-wrapping-dom-libs.md +++ b/lessons/05-wrapping-dom-libs.md @@ -77,7 +77,7 @@ and then start rendering with React again. Some people call these DOM stuff, and then keep going on the other side. The big trick is rendering nothing and then calling -`React.renderComponent` _inside_ a component. +`React.render` _inside_ a component. ```js var Dialog = React.createClass({ @@ -94,7 +94,7 @@ var Dialog = React.createClass({ // start a new React render tree with our node and the children // passed in from above, this is the other side of the portal. - React.renderComponent(
{this.props.children}
, node): + React.render(
{this.props.children}
, node): } }); ``` @@ -144,7 +144,7 @@ var Dialog = React.createClass({ props = props || this.props; // the code that used to be in `componentDidMount` - React.renderComponent(
{props.children}
, this.node): + React.render(
{props.children}
, this.node): } }); ``` @@ -213,7 +213,7 @@ var Dialog = React.createClass({ renderDialogContent: function(props) { // ... - React.renderComponent(
{props.children}
, this.node): + React.render(
{props.children}
, this.node): // after we've rendered the dialog, now we can call methods on it // via the props passed in like