Browse Source

React.renderComponent -> React.render

This covers most everything. The perf suite still needs work for the
Element updates. And the server rendering example needs to be done
wholesale.
main
Paul O’Shannessy 10 years ago
parent
commit
12b9311066
  1. 4
      _js/examples/hello.js
  2. 4
      _js/examples/markdown.js
  3. 4
      _js/examples/timer.js
  4. 4
      _js/examples/todo.js
  5. 2
      _js/html-jsx.js
  6. 4
      _js/jsx-compiler.js
  7. 4
      _js/live_editor.js

4
_js/examples/hello.js

@ -5,10 +5,10 @@ var HelloMessage = React.createClass({\n\
}\n\
});\n\
\n\
React.renderComponent(<HelloMessage name=\"John\" />, mountNode);\
React.render(<HelloMessage name=\"John\" />, mountNode);\
";
React.renderComponent(
React.render(
<ReactPlayground codeText={HELLO_COMPONENT} />,
document.getElementById('helloExample')
);

4
_js/examples/markdown.js

@ -28,10 +28,10 @@ var MarkdownEditor = React.createClass({\n\
}\n\
});\n\
\n\
React.renderComponent(<MarkdownEditor />, mountNode);\
React.render(<MarkdownEditor />, mountNode);\
";
React.renderComponent(
React.render(
<ReactPlayground codeText={MARKDOWN_COMPONENT} />,
document.getElementById('markdownExample')
);

4
_js/examples/timer.js

@ -19,10 +19,10 @@ var Timer = React.createClass({\n\
}\n\
});\n\
\n\
React.renderComponent(<Timer />, mountNode);\
React.render(<Timer />, mountNode);\
";
React.renderComponent(
React.render(
<ReactPlayground codeText={TIMER_COMPONENT} />,
document.getElementById('timerExample')
);

4
_js/examples/todo.js

@ -33,10 +33,10 @@ var TodoApp = React.createClass({\n\
);\n\
}\n\
});\n\
React.renderComponent(<TodoApp />, mountNode);\
React.render(<TodoApp />, mountNode);\
";
React.renderComponent(
React.render(
<ReactPlayground codeText={TODO_COMPONENT} />,
document.getElementById('todoExample')
);

2
_js/html-jsx.js

@ -78,5 +78,5 @@ var HELLO_COMPONENT = "\
}
});
React.renderComponent(<HTMLtoJSXComponent />, document.getElementById('jsxCompiler'));
React.render(<HTMLtoJSXComponent />, document.getElementById('jsxCompiler'));
}());

4
_js/jsx-compiler.js

@ -5,7 +5,7 @@ var HelloMessage = React.createClass({\n\
}\n\
});\n\
\n\
React.renderComponent(<HelloMessage name=\"John\" />, mountNode);\
React.render(<HelloMessage name=\"John\" />, mountNode);\
";
function transformer(harmony, code) {
@ -39,7 +39,7 @@ var CompilerPlayground = React.createClass({
);
},
});
React.renderComponent(
React.render(
<CompilerPlayground />,
document.getElementById('jsxCompiler')
);

4
_js/live_editor.js

@ -190,7 +190,7 @@ var ReactPlayground = React.createClass({
try {
var compiledCode = this.compileCode();
if (this.props.renderCode) {
React.renderComponent(
React.render(
<CodeMirrorEditor codeText={compiledCode} readOnly={true} />,
mountNode
);
@ -199,7 +199,7 @@ var ReactPlayground = React.createClass({
}
} catch (err) {
this.setTimeout(function() {
React.renderComponent(
React.render(
<div className="playgroundError">{err.toString()}</div>,
mountNode
);

Loading…
Cancel
Save