Comparing

react@18.0.0
npmjs.comunpkgBundlephobiaPackagephobia
...
react@18.2.0
npmjs.comunpkgBundlephobiaPackagephobia

Packagephobia

309.0 kB

331.4 kB

Publish

Install

Bundlephobia

npm diff

Options

files: **/!(*.map|*.min.js)

Showing 6 changed files with 53 additions and 9 deletions
SplitUnified

cjs/react-jsx-dev-runtime.development.js +++6---1

View file

@@ -100,7 +100,12 @@

100 100
101var enableDebugTracing = false; // Track which Fiber(s) schedule render work.101var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
102 102
103var REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');103var REACT_MODULE_REFERENCE;
104
105{
106 REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
107}
108
104function isValidElementType(type) {109function isValidElementType(type) {
105 if (typeof type === 'string' || typeof type === 'function') {110 if (typeof type === 'string' || typeof type === 'function') {
106 return true;111 return true;

cjs/react-jsx-runtime.development.js +++6---1

View file

@@ -100,7 +100,12 @@

100 100
101var enableDebugTracing = false; // Track which Fiber(s) schedule render work.101var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
102 102
103var REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');103var REACT_MODULE_REFERENCE;
104
105{
106 REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
107}
108
104function isValidElementType(type) {109function isValidElementType(type) {
105 if (typeof type === 'string' || typeof type === 'function') {110 if (typeof type === 'string' || typeof type === 'function') {
106 return true;111 return true;

cjs/react.development.js +++7---2

View file

@@ -23,7 +23,7 @@

23) {23) {
24 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());24 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
25}25}
26 var ReactVersion = '18.0.0-fc46dba67-20220329';26 var ReactVersion = '18.2.0';
27 27
28// ATTENTION28// ATTENTION
29// When adding new symbols to this file,29// When adding new symbols to this file,

@@ -1515,7 +1515,12 @@

1515 return elementType;1515 return elementType;
1516}1516}
1517 1517
1518var REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');1518var REACT_MODULE_REFERENCE;
1519
1520{
1521 REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
1522}
1523
1519function isValidElementType(type) {1524function isValidElementType(type) {
1520 if (typeof type === 'string' || typeof type === 'function') {1525 if (typeof type === 'string' || typeof type === 'function') {
1521 return true;1526 return true;

umd/react.development.js +++7---2

View file

@@ -13,7 +13,7 @@

13 (global = global || self, factory(global.React = {}));13 (global = global || self, factory(global.React = {}));
14}(this, (function (exports) { 'use strict';14}(this, (function (exports) { 'use strict';
15 15
16 var ReactVersion = '18.0.0-fc46dba67-20220329';16 var ReactVersion = '18.2.0';
17 17
18 // ATTENTION18 // ATTENTION
19 // When adding new symbols to this file,19 // When adding new symbols to this file,

@@ -1505,7 +1505,12 @@

1505 return elementType;1505 return elementType;
1506 }1506 }
1507 1507
1508 var REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');1508 var REACT_MODULE_REFERENCE;
1509
1510 {
1511 REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
1512 }
1513
1509 function isValidElementType(type) {1514 function isValidElementType(type) {
1510 if (typeof type === 'string' || typeof type === 'function') {1515 if (typeof type === 'string' || typeof type === 'function') {
1511 return true;1516 return true;

package.json +++1---1

View file

@@ -4,7 +4,7 @@

4 "keywords": [4 "keywords": [
5 "react"5 "react"
6 ],6 ],
7 "version": "18.0.0",7 "version": "18.2.0",
8 "homepage": "https://reactjs.org/",8 "homepage": "https://reactjs.org/",
9 "bugs": "https://github.com/facebook/react/issues",9 "bugs": "https://github.com/facebook/react/issues",
10 "license": "MIT",10 "license": "MIT",

README.md +++26---2

View file

@@ -6,8 +6,32 @@

6 6
7**Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages. Don't forget to use the [production build](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) when deploying your application.7**Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages. Don't forget to use the [production build](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) when deploying your application.
8 8
9## Example Usage9## Usage
10 10
11```js11```js
12var React = require('react');12import { useState } from 'react';
13import { createRoot } from 'react-dom/client';
14
15function Counter() {
16 const [count, setCount] = useState(0);
17 return (
18 <>
19 <h1>{count}</h1>
20 <button onClick={() => setCount(count + 1)}>
21 Increment
22 </button>
23 </>
24 );
25}
26
27const root = createRoot(document.getElementById('root'));
28root.render(<App />);
13```29```
30
31## Documentation
32
33See https://reactjs.org/
34
35## API
36
37See https://reactjs.org/docs/react-api.html