There is a new release candidate of React, v 15.0.0. Since the renderToString method now is deprecated in the library, and apparently is going to be discontinued in future versions, what is the way to support server-side rendering with React in the new version?
On the docs page, no replacement for the renderToString or other explanation has been provided except that this particular method is no longer supported.
Thank you
As described in the comments, the correct (and only) way to render to a string with recent versions of React is to use ReactDOMServer's
renderToString
. Lots of existing answers and documentation refer to the removedReact.renderToString
, though. It has been deprecated for a while, but apparently only removed recently.A quick and dirty example of what this might look like (running with node-babel):