main
js 89 lines 2.07 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 export {default as __SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './ReactSharedInternalsServer';
11
12 import {forEach, map, count, toArray, only} from './ReactChildren';
13 import {
14 REACT_FRAGMENT_TYPE,
15 REACT_PROFILER_TYPE,
16 REACT_STRICT_MODE_TYPE,
17 REACT_SUSPENSE_TYPE,
18 REACT_SUSPENSE_LIST_TYPE,
19 REACT_VIEW_TRANSITION_TYPE,
20 REACT_ACTIVITY_TYPE,
21 REACT_OPTIMISTIC_KEY,
22 } from 'shared/ReactSymbols';
23 import {
24 cloneElement,
25 createElement,
26 isValidElement,
27 } from './jsx/ReactJSXElement';
28 import {createRef} from './ReactCreateRef';
29 import {
30 use,
31 useId,
32 useCallback,
33 useDebugValue,
34 useMemo,
35 getCacheForType,
36 } from './ReactHooks';
37 import {forwardRef} from './ReactForwardRef';
38 import {lazy} from './ReactLazy';
39 import {memo} from './ReactMemo';
40 import {cache, cacheSignal} from './ReactCacheServer';
41 import {startTransition} from './ReactStartTransition';
42 import {captureOwnerStack} from './ReactOwnerStack';
43 import version from 'shared/ReactVersion';
44
45 const Children = {
46 map,
47 forEach,
48 count,
49 toArray,
50 only,
51 };
52
53 // These are server-only
54 export {
55 taintUniqueValue as experimental_taintUniqueValue,
56 taintObjectReference as experimental_taintObjectReference,
57 } from './ReactTaint';
58
59 export {
60 Children,
61 REACT_ACTIVITY_TYPE as Activity,
62 REACT_FRAGMENT_TYPE as Fragment,
63 REACT_PROFILER_TYPE as Profiler,
64 REACT_STRICT_MODE_TYPE as StrictMode,
65 REACT_SUSPENSE_TYPE as Suspense,
66 REACT_VIEW_TRANSITION_TYPE as ViewTransition,
67 cloneElement,
68 createElement,
69 createRef,
70 use,
71 forwardRef,
72 isValidElement,
73 lazy,
74 memo,
75 cache,
76 cacheSignal,
77 startTransition,
78 getCacheForType as unstable_getCacheForType,
79 useId,
80 useCallback,
81 useDebugValue,
82 useMemo,
83 version,
84 // Experimental
85 REACT_SUSPENSE_LIST_TYPE as unstable_SuspenseList,
86 // enableOptimisticKey
87 REACT_OPTIMISTIC_KEY as optimisticKey,
88 captureOwnerStack, // DEV-only
89 };