react
Advanced tools
Comparing version 0.0.0-experimental-355970aa4 to 0.0.0-experimental-3563387fe3-20240621
'use strict'; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react.production.min.js'); | ||
module.exports = require('./cjs/react.production.js'); | ||
} else { | ||
module.exports = require('./cjs/react.development.js'); | ||
} |
@@ -7,4 +7,4 @@ { | ||
], | ||
"version": "0.0.0-experimental-355970aa4", | ||
"homepage": "https://reactjs.org/", | ||
"version": "0.0.0-experimental-3563387fe3-20240621", | ||
"homepage": "https://react.dev/", | ||
"bugs": "https://github.com/facebook/react/issues", | ||
@@ -15,8 +15,31 @@ "license": "MIT", | ||
"README.md", | ||
"build-info.json", | ||
"index.js", | ||
"cjs/", | ||
"umd/" | ||
"compiler-runtime.js", | ||
"jsx-runtime.js", | ||
"jsx-runtime.react-server.js", | ||
"jsx-dev-runtime.js", | ||
"jsx-dev-runtime.react-server.js", | ||
"react.react-server.js" | ||
], | ||
"main": "index.js", | ||
"exports": { | ||
".": { | ||
"react-server": "./react.react-server.js", | ||
"default": "./index.js" | ||
}, | ||
"./package.json": "./package.json", | ||
"./jsx-runtime": { | ||
"react-server": "./jsx-runtime.react-server.js", | ||
"default": "./jsx-runtime.js" | ||
}, | ||
"./jsx-dev-runtime": { | ||
"react-server": "./jsx-dev-runtime.react-server.js", | ||
"default": "./jsx-dev-runtime.js" | ||
}, | ||
"./compiler-runtime": { | ||
"react-server": "./compiler-runtime.js", | ||
"default": "./compiler-runtime.js" | ||
} | ||
}, | ||
"repository": { | ||
@@ -29,12 +52,3 @@ "type": "git", | ||
"node": ">=0.10.0" | ||
}, | ||
"dependencies": { | ||
"loose-envify": "^1.1.0", | ||
"object-assign": "^4.1.1" | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
"loose-envify" | ||
] | ||
} | ||
} | ||
} |
@@ -9,6 +9,30 @@ # `react` | ||
## Example Usage | ||
## Usage | ||
```js | ||
var React = require('react'); | ||
import { useState } from 'react'; | ||
import { createRoot } from 'react-dom/client'; | ||
function Counter() { | ||
const [count, setCount] = useState(0); | ||
return ( | ||
<> | ||
<h1>{count}</h1> | ||
<button onClick={() => setCount(count + 1)}> | ||
Increment | ||
</button> | ||
</> | ||
); | ||
} | ||
const root = createRoot(document.getElementById('root')); | ||
root.render(<Counter />); | ||
``` | ||
## Documentation | ||
See https://react.dev/ | ||
## API | ||
See https://react.dev/reference/react |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
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
0
27
5505
1
38
195398
12
1
- 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)