Skip to content

Commit 56287cd

Browse files
committed
Merge remote-tracking branch 'origin/main' into fork-react-dom-shared-internals
2 parents a613878 + f0534ae commit 56287cd

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

packages/react-reconciler/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The React repository includes several renderers. Each of them has its own host c
5858
The examples in the React repository are declared a bit differently than a third-party renderer would be. In particular, the `HostConfig` object mentioned above is never explicitly declared, and instead is a *module* in our code. However, its exports correspond directly to properties on a `HostConfig` object you'd need to declare in your code:
5959

6060
* [React ART](https://github.com/facebook/react/blob/main/packages/react-art/src/ReactART.js) and its [host config](https://github.com/facebook/react/blob/main/packages/react-art/src/ReactARTHostConfig.js)
61-
* [React DOM](https://github.com/facebook/react/blob/main/packages/react-dom/src/client/ReactDOM.js) and its [host config](https://github.com/facebook/react/blob/main/packages/react-dom/src/client/ReactDOMHostConfig.js)
61+
* [React DOM](https://github.com/facebook/react/blob/main/packages/react-dom/src/client/ReactDOM.js) and its [host config](https://github.com/facebook/react/blob/main/packages/react-dom-bindings/src/client/ReactDOMHostConfig.js)
6262
* [React Native](https://github.com/facebook/react/blob/main/packages/react-native-renderer/src/ReactNativeRenderer.js) and its [host config](https://github.com/facebook/react/blob/main/packages/react-native-renderer/src/ReactNativeHostConfig.js)
6363

6464
If these links break please file an issue and we’ll fix them. They intentionally link to the latest versions since the API is still evolving. If you have more questions please file an issue and we’ll try to help!

packages/react-reconciler/src/ReactFiberClassUpdateQueue.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ import {
108108
ShouldCapture,
109109
DidCapture,
110110
} from './ReactFiberFlags';
111+
import getComponentNameFromFiber from './getComponentNameFromFiber';
111112

112113
import {debugRenderPhaseSideEffectsForStrictMode} from 'shared/ReactFeatureFlags';
113114

@@ -239,11 +240,13 @@ export function enqueueUpdate<State>(
239240
currentlyProcessingQueue === sharedQueue &&
240241
!didWarnUpdateInsideUpdate
241242
) {
243+
const componentName = getComponentNameFromFiber(fiber);
242244
console.error(
243245
'An update (setState, replaceState, or forceUpdate) was scheduled ' +
244246
'from inside an update function. Update functions should be pure, ' +
245247
'with zero side-effects. Consider using componentDidUpdate or a ' +
246-
'callback.',
248+
'callback.\n\nPlease update the following component: %s',
249+
componentName,
247250
);
248251
didWarnUpdateInsideUpdate = true;
249252
}

packages/react-reconciler/src/ReactFiberWorkLoop.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3771,6 +3771,7 @@ if (__DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
37713771
if (
37723772
didSuspendOrErrorWhileHydratingDEV() ||
37733773
originalError === SuspenseException ||
3774+
originalError === SelectiveHydrationException ||
37743775
(originalError !== null &&
37753776
typeof originalError === 'object' &&
37763777
typeof originalError.then === 'function')

packages/react-reconciler/src/__tests__/ReactIncrementalUpdates-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ describe('ReactIncrementalUpdates', () => {
474474
'An update (setState, replaceState, or forceUpdate) was scheduled ' +
475475
'from inside an update function. Update functions should be pure, ' +
476476
'with zero side-effects. Consider using componentDidUpdate or a ' +
477-
'callback.',
477+
'callback.\n\nPlease update the following component: Foo',
478478
);
479479
expect(instance.state).toEqual({a: 'a', b: 'b'});
480480

0 commit comments

Comments
 (0)