main
js 84 lines 1.83 KB
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 {captureOwnerStack as captureOwnerStackImpl} from './src/ReactClient';
11
12 export {
13 __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
14 __COMPILER_RUNTIME,
15 act,
16 cache,
17 cacheSignal,
18 Children,
19 cloneElement,
20 Component,
21 createContext,
22 createElement,
23 createRef,
24 useEffectEvent as experimental_useEffectEvent,
25 useEffectEvent,
26 forwardRef,
27 Fragment,
28 isValidElement,
29 lazy,
30 memo,
31 Profiler,
32 PureComponent,
33 startTransition,
34 StrictMode,
35 Suspense,
36 Activity,
37 Activity as unstable_Activity,
38 unstable_getCacheForType,
39 unstable_LegacyHidden,
40 unstable_Scope,
41 unstable_SuspenseList,
42 ViewTransition,
43 ViewTransition as unstable_ViewTransition,
44 unstable_TracingMarker,
45 addTransitionType,
46 addTransitionType as unstable_addTransitionType,
47 unstable_useCacheRefresh,
48 use,
49 useActionState,
50 useCallback,
51 useContext,
52 useDebugValue,
53 useDeferredValue,
54 useEffect,
55 useId,
56 useImperativeHandle,
57 useInsertionEffect,
58 useLayoutEffect,
59 useMemo,
60 useOptimistic,
61 useReducer,
62 useRef,
63 useState,
64 useSyncExternalStore,
65 useTransition,
66 version,
67 } from './src/ReactClient';
68
69 export {jsx, jsxs, jsxDEV} from './src/jsx/ReactJSX';
70
71 // export for backwards compatibility during upgrade
72 export {useMemoCache as unstable_useMemoCache} from './src/ReactHooks';
73
74 // export to match the name of the OSS function typically exported from
75 // react/compiler-runtime
76 export {useMemoCache as c} from './src/ReactHooks';
77
78 // Only export captureOwnerStack in development.
79 let captureOwnerStack: ?() => null | string;
80 if (__DEV__) {
81 captureOwnerStack = captureOwnerStackImpl;
82 }
83
84 export {captureOwnerStack};