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 11 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\ });\n\
\n\ \n\
React.renderComponent(<HelloMessage name=\"John\" />, mountNode);\ React.render(<HelloMessage name=\"John\" />, mountNode);\
"; ";
React.renderComponent( React.render(
<ReactPlayground codeText={HELLO_COMPONENT} />, <ReactPlayground codeText={HELLO_COMPONENT} />,
document.getElementById('helloExample') document.getElementById('helloExample')
); );

4
_js/examples/markdown.js

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

4
_js/examples/timer.js

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

4
_js/examples/todo.js

@ -33,10 +33,10 @@ var TodoApp = React.createClass({\n\
);\n\ );\n\
}\n\ }\n\
});\n\ });\n\
React.renderComponent(<TodoApp />, mountNode);\ React.render(<TodoApp />, mountNode);\
"; ";
React.renderComponent( React.render(
<ReactPlayground codeText={TODO_COMPONENT} />, <ReactPlayground codeText={TODO_COMPONENT} />,
document.getElementById('todoExample') 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\ });\n\
\n\ \n\
React.renderComponent(<HelloMessage name=\"John\" />, mountNode);\ React.render(<HelloMessage name=\"John\" />, mountNode);\
"; ";
function transformer(harmony, code) { function transformer(harmony, code) {
@ -39,7 +39,7 @@ var CompilerPlayground = React.createClass({
); );
}, },
}); });
React.renderComponent( React.render(
<CompilerPlayground />, <CompilerPlayground />,
document.getElementById('jsxCompiler') document.getElementById('jsxCompiler')
); );

4
_js/live_editor.js

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

Loading…
Cancel
Save