@apollo/client
Version:
A fully-featured caching GraphQL client.
15 lines • 571 B
JavaScript
import { prerenderStatic } from "./prerenderStatic.js";
/**
* @deprecated This function uses the legacy `renderToString` API from React.
* Use `prerenderStatic` instead, which can be configured to run with more modern
* React APIs.
*/
export async function renderToStringWithData(component) {
const { result } = await prerenderStatic({
tree: component,
renderFunction: (await import("react-dom/server")).renderToString,
maxRerenders: Number.POSITIVE_INFINITY,
});
return result;
}
//# sourceMappingURL=renderToStringWithData.js.map