mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
This wires up the use of `async_hooks` in the Node build (as well as the Edge build when a global is available) in DEV mode only. This will be used to track debug info about what suspended during an RSC pass. Enabled behind a flag for now.
21 lines
651 B
JavaScript
21 lines
651 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
*/
|
|
import {AsyncLocalStorage} from 'async_hooks';
|
|
|
|
import type {Request} from 'react-server/src/ReactFlightServer';
|
|
|
|
export * from 'react-server-dom-esm/src/ReactFlightServerConfigESMBundler';
|
|
export * from 'react-dom-bindings/src/server/ReactFlightServerConfigDOM';
|
|
|
|
export const supportsRequestStorage = true;
|
|
export const requestStorage: AsyncLocalStorage<Request> =
|
|
new AsyncLocalStorage();
|
|
|
|
export * from '../ReactFlightServerConfigDebugNoop';
|