Skip to content

Commit

Permalink
Add @todos for where React v0.14 renders should go
Browse files Browse the repository at this point in the history
  • Loading branch information
ericclemmons committed Aug 9, 2015
1 parent 1ae1e52 commit 0a92e51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ export default class Resolver extends React.Component {
// Server-rendered output, but missing payload
if (!initialData && node.innerHTML) {
return Resolver.resolve(render).then(({ Resolved }) => {
// @TODO - Use react-dom.render
React.render(<Resolved />, node);
});
}

// @TODO - Use react-dom.render
React.render((
<Resolver data={initialData}>
{render}
Expand All @@ -52,6 +54,7 @@ export default class Resolver extends React.Component {
static resolve = function(render, initialData = {}) {
const queue = [];

// @TODO - Use react-dom/server.renderToStaticMarkup
React.renderToStaticMarkup(
<Resolver data={initialData} onResolve={(promise) => queue.push(promise)}>
{render}
Expand Down

0 comments on commit 0a92e51

Please sign in to comment.