{ "manifest": { "name": "react-dom", "version": "18.3.1", "description": "React package for working with the DOM.", "main": "index.js", "repository": { "type": "git", "url": "https://github.com/facebook/react.git", "directory": "packages/react-dom" }, "keywords": [ "react" ], "license": "MIT", "bugs": { "url": "https://github.com/facebook/react/issues" }, "homepage": "https://reactjs.org/", "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" }, "peerDependencies": { "react": "^18.3.1" }, "files": [ "LICENSE", "README.md", "index.js", "client.js", "profiling.js", "server.js", "server.browser.js", "server.node.js", "test-utils.js", "cjs/", "umd/" ], "exports": { ".": "./index.js", "./client": "./client.js", "./server": { "deno": "./server.browser.js", "worker": "./server.browser.js", "browser": "./server.browser.js", "default": "./server.node.js" }, "./server.browser": "./server.browser.js", "./server.node": "./server.node.js", "./profiling": "./profiling.js", "./test-utils": "./test-utils.js", "./package.json": "./package.json" }, "browser": { "./server.js": "./server.browser.js" }, "browserify": { "transform": [ "loose-envify" ] }, "_registry": "npm", "_loc": "/home/josie/.cache/yarn/v6/npm-react-dom-18.3.1-c2265d79511b57d479b3dd3fdfa51536494c5cb4-integrity/node_modules/react-dom/package.json", "readmeFilename": "README.md", "readme": "# `react-dom`\n\nThis package serves as the entry point to the DOM and server renderers for React. It is intended to be paired with the generic React package, which is shipped as `react` to npm.\n\n## Installation\n\n```sh\nnpm install react react-dom\n```\n\n## Usage\n\n### In the browser\n\n```js\nimport { createRoot } from 'react-dom/client';\n\nfunction App() {\n return
Hello World
;\n}\n\nconst root = createRoot(document.getElementById('root'));\nroot.render();\n```\n\n### On the server\n\n```js\nimport { renderToPipeableStream } from 'react-dom/server';\n\nfunction App() {\n return
Hello World
;\n}\n\nfunction handleRequest(res) {\n // ... in your server handler ...\n const stream = renderToPipeableStream(, {\n onShellReady() {\n res.statusCode = 200;\n res.setHeader('Content-type', 'text/html');\n stream.pipe(res);\n },\n // ...\n });\n}\n```\n\n## API\n\n### `react-dom`\n\nSee https://reactjs.org/docs/react-dom.html\n\n### `react-dom/client`\n\nSee https://reactjs.org/docs/react-dom-client.html\n\n### `react-dom/server`\n\nSee https://reactjs.org/docs/react-dom-server.html\n", "scripts": { "start": "node server.js" }, "licenseText": "MIT License\n\nCopyright (c) Facebook, Inc. and its affiliates.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" }, "artifacts": [], "remote": { "resolved": "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4", "type": "tarball", "reference": "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz", "hash": "c2265d79511b57d479b3dd3fdfa51536494c5cb4", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "registry": "npm", "packageName": "react-dom", "cacheIntegrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== sha1-wiZdeVEbV9R5s90/36UVNklMXLQ=" }, "registry": "npm", "hash": "c2265d79511b57d479b3dd3fdfa51536494c5cb4" }