diff --git a/fixtures/fizz/server/render-to-stream.js b/fixtures/fizz/server/render-to-stream.js index 9c9c0d019366c..2ae822f0b1a5f 100644 --- a/fixtures/fizz/server/render-to-stream.js +++ b/fixtures/fizz/server/render-to-stream.js @@ -45,6 +45,11 @@ module.exports = function render(url, res) { onError(x) { didError = true; console.error(x); + // Redundant with `console.createTask`. Only added for debugging. + console.error( + 'The above error occurred during server rendering: %s', + React.captureOwnerStack() + ); }, }); // Abandon and switch to client rendering if enough time passes. diff --git a/fixtures/fizz/src/App.js b/fixtures/fizz/src/App.js index df7cbd6d02338..8a82dd925d694 100644 --- a/fixtures/fizz/src/App.js +++ b/fixtures/fizz/src/App.js @@ -6,10 +6,17 @@ * */ +import {Suspense} from 'react'; import Html from './Html'; import BigComponent from './BigComponent'; +import MaybeHaltedComponent from './MaybeHaltedComponent'; -export default function App({assets, title}) { +const serverHalt = + typeof window === 'undefined' + ? new Promise(() => {}) + : Promise.resolve('client'); + +export default function App({assets, promise, title}) { const components = []; for (let i = 0; i <= 250; i++) { @@ -21,6 +28,10 @@ export default function App({assets, title}) {