main
js 19 lines 476 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 * @flow
8 */
9
10 import type {Task} from './ReactFizzServer';
11
12 // DEV-only global reference to the currently executing task
13 export let currentTaskInDEV: null | Task = null;
14
15 export function setCurrentTaskInDEV(task: null | Task): void {
16 if (__DEV__) {
17 currentTaskInDEV = task;
18 }
19 }