main
js 39 lines 1007 Bytes
Raw
1 /**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8 // This file is only used for tests.
9 // It lazily loads the implementation so that we get the correct set of host configs.
10
11 import ReactVersion from 'shared/ReactVersion';
12 export {ReactVersion as version};
13
14 export function renderToString() {
15 return require('./src/server/ReactDOMLegacyServerBrowser').renderToString.apply(
16 this,
17 arguments,
18 );
19 }
20 export function renderToStaticMarkup() {
21 return require('./src/server/ReactDOMLegacyServerBrowser').renderToStaticMarkup.apply(
22 this,
23 arguments,
24 );
25 }
26
27 export function renderToReadableStream() {
28 return require('./src/server/react-dom-server.browser').renderToReadableStream.apply(
29 this,
30 arguments,
31 );
32 }
33
34 export function resume() {
35 return require('./src/server/react-dom-server.browser').resume.apply(
36 this,
37 arguments,
38 );
39 }