facebook / react

The library for web and native user interfaces.
https://react.dev
MIT License
229.26k stars 46.95k forks source link

How to get a standalone build (.js file) of ReactDOMServer #5134

Closed Daniel15 closed 9 years ago

Daniel15 commented 9 years ago

I'm doing server-side rendering in ReactJS.NET, and am seeing this warning after upgrading the library to React 0.14:

React.renderToString is deprecated. Please use ReactDOMServer.renderToString from require('react-dom/server') instead

ReactJS.NET uses V8 directly (ie. it does not use Node.js) so I can't simply require an npm module from within the library. I imagine node-rails and react-php-v8js are in the same situation.

How do I build a .js file containing ReactDOMServer? Should I just have my own Webpack/Browserify bundle?

sophiebits commented 9 years ago

Should I just have my own Webpack/Browserify bundle?

I think that's best.