main
js 87 lines 1.98 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 version from 'shared/ReactVersion';
43
44 const Children = {
45 map,
46 forEach,
47 count,
48 toArray,
49 only,
50 };
51
52 // These are server-only
53 export {
54 taintUniqueValue as experimental_taintUniqueValue,
55 taintObjectReference as experimental_taintObjectReference,
56 } from './ReactTaint';
57
58 export {
59 Children,
60 REACT_ACTIVITY_TYPE as Activity,
61 REACT_FRAGMENT_TYPE as Fragment,
62 REACT_PROFILER_TYPE as Profiler,
63 REACT_STRICT_MODE_TYPE as StrictMode,
64 REACT_SUSPENSE_TYPE as Suspense,
65 REACT_VIEW_TRANSITION_TYPE as ViewTransition,
66 cloneElement,
67 createElement,
68 createRef,
69 use,
70 forwardRef,
71 isValidElement,
72 lazy,
73 memo,
74 cache,
75 cacheSignal,
76 startTransition,
77 getCacheForType as unstable_getCacheForType,
78 useId,
79 useCallback,
80 useDebugValue,
81 useMemo,
82 version,
83 // Experimental
84 REACT_SUSPENSE_LIST_TYPE as unstable_SuspenseList,
85 // enableOptimisticKey
86 REACT_OPTIMISTIC_KEY as optimisticKey,
87 };