Skip to content

Commit ed86c04

Browse files
committed
Stable Named Exports
1 parent 5fc2f27 commit ed86c04

File tree

81 files changed

+25951
-26166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+25951
-26166
lines changed

build/bundle-sizes.json

Lines changed: 128 additions & 128 deletions
Large diffs are not rendered by default.

build/dist/react-cache.development.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,4 @@
334334
exports.unstable_createResource = unstable_createResource;
335335
exports.unstable_setGlobalCacheLimit = unstable_setGlobalCacheLimit;
336336

337-
Object.defineProperty(exports, '__esModule', { value: true });
338-
339337
})));

build/dist/react-cache.production.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/dist/react-dom-testing.development.js

Lines changed: 33 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
'use strict';
1111

1212
(function (global, factory) {
13-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react')) :
14-
typeof define === 'function' && define.amd ? define(['react'], factory) :
15-
(global = global || self, global.ReactDOM = factory(global.React));
16-
}(this, (function (React) { 'use strict';
13+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
14+
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
15+
(global = global || self, factory(global.ReactDOM = {}, global.React));
16+
}(this, (function (exports, React) { 'use strict';
1717

1818
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
1919
// Current owner and dispatcher used to share the same ref,
@@ -25072,6 +25072,7 @@
2507225072

2507325073
unbatchedUpdates(function () {
2507425074
legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
25075+
// $FlowFixMe This should probably use `delete container._reactRootContainer`
2507525076
container._reactRootContainer = null;
2507625077
unmarkContainerAsRoot(container);
2507725078
});
@@ -25135,53 +25136,36 @@
2513525136
throw Error( "Target container is not a DOM element." );
2513625137
}
2513725138
} // TODO: pass ReactDOM portal implementation as third argument
25139+
// $FlowFixMe The Flow type is opaque but there's no way to actually create it.
2513825140

2513925141

2514025142
return createPortal(children, container, null, key);
2514125143
}
2514225144

25143-
var ReactDOM = {
25144-
createPortal: createPortal$1,
25145-
unstable_batchedUpdates: batchedUpdates$1,
25146-
flushSync: flushSync,
25147-
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
25148-
// Keep in sync with ReactDOMUnstableNativeDependencies.js
25149-
// ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.
25150-
Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]
25151-
},
25152-
version: ReactVersion
25153-
};
25145+
function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
2515425146

25155-
{
25156-
ReactDOM.findDOMNode = findDOMNode;
25157-
ReactDOM.hydrate = hydrate;
25158-
ReactDOM.render = render;
25159-
ReactDOM.unmountComponentAtNode = unmountComponentAtNode;
25147+
return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
2516025148
}
2516125149

25162-
{
25163-
ReactDOM.unstable_renderSubtreeIntoContainer = function () {
25164-
25165-
return unstable_renderSubtreeIntoContainer.apply(void 0, arguments);
25166-
};
25167-
}
25150+
function unstable_createPortal(children, container) {
25151+
var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
2516825152

25169-
{
25170-
// Temporary alias since we already shipped React 16 RC with it.
25171-
// TODO: remove in React 17.
25172-
ReactDOM.unstable_createPortal = function () {
25173-
{
25174-
if (!didWarnAboutUnstableCreatePortal) {
25175-
didWarnAboutUnstableCreatePortal = true;
25153+
{
25154+
if (!didWarnAboutUnstableCreatePortal) {
25155+
didWarnAboutUnstableCreatePortal = true;
2517625156

25177-
warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
25178-
}
25157+
warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
2517925158
}
25159+
}
2518025160

25181-
return createPortal$1.apply(void 0, arguments);
25182-
};
25161+
return createPortal$1(children, container, key);
2518325162
}
2518425163

25164+
var Internals = {
25165+
// Keep in sync with ReactDOMUnstableNativeDependencies.js
25166+
// ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.
25167+
Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]
25168+
};
2518525169
var foundDevTools = injectIntoDevTools({
2518625170
findFiberByHostInstance: getClosestInstanceFromNode,
2518725171
bundleType: 1 ,
@@ -25203,27 +25187,17 @@
2520325187
}
2520425188
}
2520525189

25206-
{
25207-
ReactDOM.act = act;
25208-
}
25209-
25210-
var ReactDOM$1 = /*#__PURE__*/Object.freeze({
25211-
__proto__: null,
25212-
'default': ReactDOM
25213-
});
25214-
25215-
function getCjsExportFromNamespace (n) {
25216-
return n && n['default'] || n;
25217-
}
25218-
25219-
var ReactDOM$2 = getCjsExportFromNamespace(ReactDOM$1);
25220-
25221-
// TODO: decide on the top-level export form.
25222-
// This is hacky but makes it work with both Rollup and Jest.
25223-
25224-
25225-
var testing = ReactDOM$2.default || ReactDOM$2;
25226-
25227-
return testing;
25190+
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
25191+
exports.act = act;
25192+
exports.createPortal = createPortal$1;
25193+
exports.findDOMNode = findDOMNode;
25194+
exports.flushSync = flushSync;
25195+
exports.hydrate = hydrate;
25196+
exports.render = render;
25197+
exports.unmountComponentAtNode = unmountComponentAtNode;
25198+
exports.unstable_batchedUpdates = batchedUpdates$1;
25199+
exports.unstable_createPortal = unstable_createPortal;
25200+
exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
25201+
exports.version = ReactVersion;
2522825202

2522925203
})));

0 commit comments

Comments
 (0)