{"library":"react-dom-server","title":"Legacy React DOM Server (Pre-React 15)","description":"This `react-dom-server` package, last published at version `0.0.5` in February 2016, represents an extremely early and now entirely abandoned attempt at providing server-side rendering capabilities for React applications. It predates the official `react-dom` package's `react-dom/server` entry point, which became the standard for server rendering. The package was designed for use with very old React versions (e.g., `0.14.x`) and offers no modern features or compatibility. It lacks a README, indicating it was likely an internal experiment or a placeholder that was quickly superseded. Developers should use `react-dom/server` from the official `react-dom` package for any server-side rendering needs, as this specific `react-dom-server` package is not maintained, secure, or functional with contemporary React versions. There is no active release cadence, and it has zero downloads in recent times.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install react-dom-server"],"cli":null},"imports":["const ReactDOMServer = require('react-dom-server');","const ReactDOMServer = require('react-dom-server');\nconst html = ReactDOMServer.renderToString(<App />);","const ReactDOMServer = require('react-dom-server');\nconst staticHtml = ReactDOMServer.renderToStaticMarkup(<StaticPage />);"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const React = require('react');\nconst ReactDOMServer = require('react-dom-server');\n\nfunction App() {\n  return React.createElement('div', null, `Hello from server-side React ${React.version}`);\n}\n\nconst html = ReactDOMServer.renderToString(React.createElement(App));\n\nconsole.log(html);\n// Expected output: <div data-reactroot=\"\" data-reactid=\"1\">Hello from server-side React 0.14.7</div>\n\n// For a static site, without React-specific attributes:\nfunction StaticPage() {\n  return React.createElement('h1', null, 'This is a static page');\n}\n\nconst staticHtml = ReactDOMServer.renderToStaticMarkup(React.createElement(StaticPage));\nconsole.log(staticHtml);\n// Expected output: <h1>This is a static page</h1>","lang":"javascript","description":"This example demonstrates how `react-dom-server` (an old, abandoned package) would have been used to render React components to HTML strings on the server. It illustrates both `renderToString` and `renderToStaticMarkup` methods for an extremely old React version (0.14.x) using CommonJS modules.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}