react 18.3.1 → 19.0.0-beta-4508873393-20240430
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +3 -3
- package/cjs/react-compiler-runtime.development.js +79 -0
- package/cjs/react-compiler-runtime.production.js +16 -0
- package/cjs/react-compiler-runtime.profiling.js +16 -0
- package/cjs/react-jsx-dev-runtime.development.js +599 -631
- package/cjs/react-jsx-dev-runtime.production.js +14 -0
- package/cjs/react-jsx-dev-runtime.profiling.js +14 -0
- package/cjs/react-jsx-dev-runtime.react-server.development.js +1318 -0
- package/cjs/react-jsx-dev-runtime.react-server.production.js +40 -0
- package/cjs/react-jsx-runtime.development.js +623 -645
- package/cjs/react-jsx-runtime.production.js +34 -0
- package/cjs/react-jsx-runtime.profiling.js +34 -0
- package/cjs/react-jsx-runtime.react-server.development.js +1318 -0
- package/cjs/react-jsx-runtime.react-server.production.js +40 -0
- package/cjs/react.development.js +1780 -1703
- package/cjs/react.production.js +539 -0
- package/cjs/react.react-server.development.js +2194 -0
- package/cjs/react.react-server.production.js +479 -0
- package/compiler-runtime.js +14 -0
- package/index.js +1 -1
- package/jsx-dev-runtime.js +1 -1
- package/jsx-dev-runtime.react-server.js +7 -0
- package/jsx-runtime.js +1 -1
- package/jsx-runtime.react-server.js +7 -0
- package/package.json +19 -15
- package/react.react-server.js +7 -0
- package/cjs/react-jsx-dev-runtime.production.min.js +0 -10
- package/cjs/react-jsx-dev-runtime.profiling.min.js +0 -10
- package/cjs/react-jsx-runtime.production.min.js +0 -11
- package/cjs/react-jsx-runtime.profiling.min.js +0 -11
- package/cjs/react.production.min.js +0 -26
- package/cjs/react.shared-subset.development.js +0 -20
- package/cjs/react.shared-subset.production.min.js +0 -10
- package/react.shared-subset.js +0 -7
- package/umd/react.development.js +0 -3343
- package/umd/react.production.min.js +0 -31
- package/umd/react.profiling.min.js +0 -31
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -25,13 +25,13 @@ function Counter() {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const root = createRoot(document.getElementById('root'));
|
|
28
|
-
root.render(<
|
|
28
|
+
root.render(<Counter />);
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## Documentation
|
|
32
32
|
|
|
33
|
-
See https://
|
|
33
|
+
See https://react.dev/
|
|
34
34
|
|
|
35
35
|
## API
|
|
36
36
|
|
|
37
|
-
See https://
|
|
37
|
+
See https://react.dev/reference/react
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-compiler-runtime.development.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
if (process.env.NODE_ENV !== "production") {
|
|
14
|
+
(function() {
|
|
15
|
+
'use strict';
|
|
16
|
+
|
|
17
|
+
var React = require('react');
|
|
18
|
+
|
|
19
|
+
var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
20
|
+
|
|
21
|
+
function error(format) {
|
|
22
|
+
{
|
|
23
|
+
{
|
|
24
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
25
|
+
args[_key2 - 1] = arguments[_key2];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
printWarning('error', format, args);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function printWarning(level, format, args) {
|
|
34
|
+
// When changing this logic, you might want to also
|
|
35
|
+
// update consoleWithStackDev.www.js as well.
|
|
36
|
+
{
|
|
37
|
+
var stack = ReactSharedInternals.getStackAddendum();
|
|
38
|
+
|
|
39
|
+
if (stack !== '') {
|
|
40
|
+
format += '%s';
|
|
41
|
+
args = args.concat([stack]);
|
|
42
|
+
} // eslint-disable-next-line react-internal/safe-string-coercion
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
var argsWithFormat = args.map(function (item) {
|
|
46
|
+
return String(item);
|
|
47
|
+
}); // Careful: RN currently depends on this prefix
|
|
48
|
+
|
|
49
|
+
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
50
|
+
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
51
|
+
// eslint-disable-next-line react-internal/no-production-logging
|
|
52
|
+
|
|
53
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function resolveDispatcher() {
|
|
58
|
+
var dispatcher = ReactSharedInternals.H;
|
|
59
|
+
|
|
60
|
+
{
|
|
61
|
+
if (dispatcher === null) {
|
|
62
|
+
error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.');
|
|
63
|
+
}
|
|
64
|
+
} // Will result in a null access error if accessed outside render phase. We
|
|
65
|
+
// intentionally don't throw our own error because this is in a hot path.
|
|
66
|
+
// Also helps ensure this is inlined.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
return dispatcher;
|
|
70
|
+
}
|
|
71
|
+
function useMemoCache(size) {
|
|
72
|
+
var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional
|
|
73
|
+
|
|
74
|
+
return dispatcher.useMemoCache(size);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
exports.c = useMemoCache;
|
|
78
|
+
})();
|
|
79
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-compiler-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
"use strict";
|
|
12
|
+
var ReactSharedInternals =
|
|
13
|
+
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
14
|
+
exports.c = function (size) {
|
|
15
|
+
return ReactSharedInternals.H.useMemoCache(size);
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-compiler-runtime.profiling.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
"use strict";
|
|
12
|
+
var ReactSharedInternals =
|
|
13
|
+
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
14
|
+
exports.c = function (size) {
|
|
15
|
+
return ReactSharedInternals.H.useMemoCache(size);
|
|
16
|
+
};
|