Skip to content

Commit

Permalink
Unfork ReactFiberErrorDialog and implement it using the new config op…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
sebmarkbage committed Mar 27, 2024
1 parent 60e55a4 commit fbc9398
Show file tree
Hide file tree
Showing 11 changed files with 543 additions and 142 deletions.
5 changes: 2 additions & 3 deletions packages/react-dom/index.classic.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ Object.assign((Internals: any), {

export {
createPortal,
createRoot,
hydrateRoot,
findDOMNode,
flushSync,
render,
unmountComponentAtNode,
unstable_batchedUpdates,
unstable_createEventHandle,
Expand All @@ -41,4 +38,6 @@ export {
version,
} from './src/client/ReactDOM';

export {createRoot, hydrateRoot, render} from './src/client/ReactDOMRootFB';

export {Internals as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED};
4 changes: 2 additions & 2 deletions packages/react-dom/index.modern.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternals';
export {
createPortal,
createRoot,
hydrateRoot,
flushSync,
unstable_batchedUpdates,
unstable_createEventHandle,
Expand All @@ -26,3 +24,5 @@ export {
preinitModule,
version,
} from './src/client/ReactDOM';

export {createRoot, hydrateRoot} from './src/client/ReactDOMRootFB';
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ describe('ReactDOMServerPartialHydration', () => {
'Component',
'Component',
// Hydration mismatch is logged
'Hydration failed because the server rendered HTML didn\'t match the client.',
"Hydration failed because the server rendered HTML didn't match the client.",
'There was an error while hydrating this Suspense boundary.',
]);

Expand Down Expand Up @@ -1162,7 +1162,7 @@ describe('ReactDOMServerPartialHydration', () => {
});

assertLog([
'Hydration failed because the server rendered HTML didn\'t match the client.',
"Hydration failed because the server rendered HTML didn't match the client.",
'There was an error while hydrating this Suspense boundary.',
]);

Expand Down
Loading

0 comments on commit fbc9398

Please sign in to comment.