react-dom
Advanced tools
Comparing version 0.0.0-experimental-4ead6b530 to 0.0.0-experimental-4f604941-20240830
@@ -35,5 +35,5 @@ 'use strict'; | ||
checkDCE(); | ||
module.exports = require('./cjs/react-dom.production.min.js'); | ||
module.exports = require('./cjs/react-dom.production.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom.development.js'); | ||
} |
113
package.json
{ | ||
"name": "react-dom", | ||
"version": "0.0.0-experimental-4ead6b530", | ||
"version": "0.0.0-experimental-4f604941-20240830", | ||
"description": "React package for working with the DOM.", | ||
@@ -18,10 +18,8 @@ "main": "index.js", | ||
}, | ||
"homepage": "https://reactjs.org/", | ||
"homepage": "https://react.dev/", | ||
"dependencies": { | ||
"loose-envify": "^1.1.0", | ||
"object-assign": "^4.1.1", | ||
"scheduler": "0.0.0-experimental-4ead6b530" | ||
"scheduler": "0.0.0-experimental-4f604941-20240830" | ||
}, | ||
"peerDependencies": { | ||
"react": "0.0.0-experimental-4ead6b530" | ||
"react": "0.0.0-experimental-4f604941-20240830" | ||
}, | ||
@@ -31,24 +29,99 @@ "files": [ | ||
"README.md", | ||
"build-info.json", | ||
"client.js", | ||
"client.react-server.js", | ||
"index.js", | ||
"profiling.js", | ||
"profiling.react-server.js", | ||
"react-dom.react-server.js", | ||
"server.browser.js", | ||
"server.bun.js", | ||
"server.edge.js", | ||
"server.js", | ||
"server.browser.js", | ||
"server.node.js", | ||
"server.react-server.js", | ||
"static.browser.js", | ||
"static.edge.js", | ||
"static.js", | ||
"static.node.js", | ||
"static.react-server.js", | ||
"test-utils.js", | ||
"unstable-fizz.js", | ||
"unstable-fizz.browser.js", | ||
"unstable-fizz.node.js", | ||
"cjs/", | ||
"umd/" | ||
"unstable_testing.js", | ||
"unstable_testing.react-server.js", | ||
"unstable_server-external-runtime.js", | ||
"cjs/" | ||
], | ||
"exports": { | ||
".": { | ||
"react-server": "./react-dom.react-server.js", | ||
"default": "./index.js" | ||
}, | ||
"./client": { | ||
"react-server": "./client.react-server.js", | ||
"default": "./client.js" | ||
}, | ||
"./server": { | ||
"react-server": "./server.react-server.js", | ||
"workerd": "./server.edge.js", | ||
"bun": "./server.bun.js", | ||
"deno": "./server.browser.js", | ||
"worker": "./server.browser.js", | ||
"node": "./server.node.js", | ||
"edge-light": "./server.edge.js", | ||
"browser": "./server.browser.js", | ||
"default": "./server.node.js" | ||
}, | ||
"./server.browser": { | ||
"react-server": "./server.react-server.js", | ||
"default": "./server.browser.js" | ||
}, | ||
"./server.bun": { | ||
"react-server": "./server.react-server.js", | ||
"default": "./server.bun.js" | ||
}, | ||
"./server.edge": { | ||
"react-server": "./server.react-server.js", | ||
"default": "./server.edge.js" | ||
}, | ||
"./server.node": { | ||
"react-server": "./server.react-server.js", | ||
"default": "./server.node.js" | ||
}, | ||
"./static": { | ||
"react-server": "./static.react-server.js", | ||
"workerd": "./static.edge.js", | ||
"deno": "./static.browser.js", | ||
"worker": "./static.browser.js", | ||
"node": "./static.node.js", | ||
"edge-light": "./static.edge.js", | ||
"browser": "./static.browser.js", | ||
"default": "./static.node.js" | ||
}, | ||
"./static.browser": { | ||
"react-server": "./static.react-server.js", | ||
"default": "./static.browser.js" | ||
}, | ||
"./static.edge": { | ||
"react-server": "./static.react-server.js", | ||
"default": "./static.edge.js" | ||
}, | ||
"./static.node": { | ||
"react-server": "./static.react-server.js", | ||
"default": "./static.node.js" | ||
}, | ||
"./profiling": { | ||
"react-server": "./profiling.react-server.js", | ||
"default": "./profiling.js" | ||
}, | ||
"./test-utils": "./test-utils.js", | ||
"./unstable_testing": { | ||
"react-server": "./unstable_testing.react-server.js", | ||
"default": "./unstable_testing.js" | ||
}, | ||
"./unstable_server-external-runtime": "./unstable_server-external-runtime.js", | ||
"./package.json": "./package.json" | ||
}, | ||
"browser": { | ||
"./server.js": "./server.browser.js", | ||
"./unstable-fizz.js": "./unstable-fizz.browser.js" | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
"loose-envify" | ||
] | ||
"./static.js": "./static.browser.js" | ||
} | ||
} | ||
} |
@@ -35,5 +35,5 @@ 'use strict'; | ||
checkDCE(); | ||
module.exports = require('./cjs/react-dom.profiling.min.js'); | ||
module.exports = require('./cjs/react-dom-profiling.profiling.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom.development.js'); | ||
module.exports = require('./cjs/react-dom-profiling.development.js'); | ||
} |
@@ -16,12 +16,10 @@ # `react-dom` | ||
```js | ||
var React = require('react'); | ||
var ReactDOM = require('react-dom'); | ||
import { createRoot } from 'react-dom/client'; | ||
class MyComponent extends React.Component { | ||
render() { | ||
return <div>Hello World</div>; | ||
} | ||
function App() { | ||
return <div>Hello World</div>; | ||
} | ||
ReactDOM.render(<MyComponent />, node); | ||
const root = createRoot(document.getElementById('root')); | ||
root.render(<App />); | ||
``` | ||
@@ -32,12 +30,19 @@ | ||
```js | ||
var React = require('react'); | ||
var ReactDOMServer = require('react-dom/server'); | ||
import { renderToPipeableStream } from 'react-dom/server'; | ||
class MyComponent extends React.Component { | ||
render() { | ||
return <div>Hello World</div>; | ||
} | ||
function App() { | ||
return <div>Hello World</div>; | ||
} | ||
ReactDOMServer.renderToString(<MyComponent />); | ||
function handleRequest(res) { | ||
// ... in your server handler ... | ||
const stream = renderToPipeableStream(<App />, { | ||
onShellReady() { | ||
res.statusCode = 200; | ||
res.setHeader('Content-type', 'text/html'); | ||
stream.pipe(res); | ||
}, | ||
// ... | ||
}); | ||
} | ||
``` | ||
@@ -49,9 +54,10 @@ | ||
- `findDOMNode` | ||
- `render` | ||
- `unmountComponentAtNode` | ||
See https://react.dev/reference/react-dom | ||
### `react-dom/client` | ||
See https://react.dev/reference/react-dom/client | ||
### `react-dom/server` | ||
- `renderToString` | ||
- `renderToStaticMarkup` | ||
See https://react.dev/reference/react-dom/server |
'use strict'; | ||
var l, s; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-dom-server.browser.production.min.js'); | ||
l = require('./cjs/react-dom-server-legacy.browser.production.js'); | ||
s = require('./cjs/react-dom-server.browser.production.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom-server.browser.development.js'); | ||
l = require('./cjs/react-dom-server-legacy.browser.development.js'); | ||
s = require('./cjs/react-dom-server.browser.development.js'); | ||
} | ||
exports.version = l.version; | ||
exports.renderToString = l.renderToString; | ||
exports.renderToStaticMarkup = l.renderToStaticMarkup; | ||
exports.renderToReadableStream = s.renderToReadableStream; | ||
if (s.resume) { | ||
exports.resume = s.resume; | ||
} |
'use strict'; | ||
var l, s; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-dom-server.node.production.min.js'); | ||
l = require('./cjs/react-dom-server-legacy.node.production.js'); | ||
s = require('./cjs/react-dom-server.node.production.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom-server.node.development.js'); | ||
l = require('./cjs/react-dom-server-legacy.node.development.js'); | ||
s = require('./cjs/react-dom-server.node.development.js'); | ||
} | ||
exports.version = l.version; | ||
exports.renderToString = l.renderToString; | ||
exports.renderToStaticMarkup = l.renderToStaticMarkup; | ||
exports.renderToPipeableStream = s.renderToPipeableStream; | ||
if (s.resumeToPipeableStream) { | ||
exports.resumeToPipeableStream = s.resumeToPipeableStream; | ||
} |
'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-dom-test-utils.production.min.js'); | ||
module.exports = require('./cjs/react-dom-test-utils.production.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom-test-utils.development.js'); | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 7 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
8191926
2
48
219913
61
19
54
1
+ Addedreact@0.0.0-experimental-4f604941-20240830(transitive)
+ Addedscheduler@0.0.0-experimental-4f604941-20240830(transitive)
- Removedloose-envify@^1.1.0
- Removedobject-assign@^4.1.1
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedreact@0.0.0-experimental-4ead6b530(transitive)
- Removedscheduler@0.0.0-experimental-4ead6b530(transitive)