Skip to content

Commit

Permalink
Remove renderToStaticNodeStream (#28873)
Browse files Browse the repository at this point in the history
Stacked on #28872

renderToStaticNodeStream was not originally deprecated when
renderToNodeStream was deprecated because it did not yet have a clear
analog in the modern streaming implementation for SSR. In React 19 we
have already removed renderToNodeStream. This change removes
renderToStaticNodeStream as well because you can replicate it's
semantics using renderToPipeableStream with onAllReady or
renderToReadableStream with await stream.allready.

DiffTrain build for [33a3244](33a3244)
  • Loading branch information
gnoff committed Apr 19, 2024
1 parent 11b41e0 commit 627e1be
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 28 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d329ff9d9e87f3f909f98cf63701ef3795cf2584
33a32441e991e126e5e874f831bd3afc237a3ecf
10 changes: 1 addition & 9 deletions compiled/facebook-www/ReactDOMServer-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "19.0.0-www-classic-477ccba7";
var ReactVersion = "19.0.0-www-classic-09d610a8";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -14736,15 +14736,7 @@ if (__DEV__) {
);
}

function renderToStaticNodeStream() {
throw new Error(
"ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available " +
"in the browser. Use ReactDOMServer.renderToStaticMarkup() instead."
);
}

exports.renderToStaticMarkup = renderToStaticMarkup;
exports.renderToStaticNodeStream = renderToStaticNodeStream;
exports.renderToString = renderToString;
exports.version = ReactVersion;
})();
Expand Down
10 changes: 1 addition & 9 deletions compiled/facebook-www/ReactDOMServer-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "19.0.0-www-modern-d1bfd9cd";
var ReactVersion = "19.0.0-www-modern-a9bcdef2";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -14641,15 +14641,7 @@ if (__DEV__) {
);
}

function renderToStaticNodeStream() {
throw new Error(
"ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available " +
"in the browser. Use ReactDOMServer.renderToStaticMarkup() instead."
);
}

exports.renderToStaticMarkup = renderToStaticMarkup;
exports.renderToStaticNodeStream = renderToStaticNodeStream;
exports.renderToString = renderToString;
exports.version = ReactVersion;
})();
Expand Down
5 changes: 1 addition & 4 deletions compiled/facebook-www/ReactDOMServer-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -5676,9 +5676,6 @@ exports.renderToStaticMarkup = function (children, options) {
'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.renderToStaticNodeStream = function () {
throw Error(formatProdErrorMessage(208));
};
exports.renderToString = function (children, options) {
return renderToStringImpl(
children,
Expand All @@ -5687,4 +5684,4 @@ exports.renderToString = function (children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "19.0.0-www-classic-77d529ff";
exports.version = "19.0.0-www-classic-c3826905";
5 changes: 1 addition & 4 deletions compiled/facebook-www/ReactDOMServer-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -5654,9 +5654,6 @@ exports.renderToStaticMarkup = function (children, options) {
'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.renderToStaticNodeStream = function () {
throw Error(formatProdErrorMessage(208));
};
exports.renderToString = function (children, options) {
return renderToStringImpl(
children,
Expand All @@ -5665,4 +5662,4 @@ exports.renderToString = function (children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "19.0.0-www-modern-322b4431";
exports.version = "19.0.0-www-modern-f02d17e5";
1 change: 0 additions & 1 deletion compiled/facebook-www/__test_utils__/ReactAllWarnings.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 627e1be

Please sign in to comment.