| 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 | // Keep in sync with https://github.com/facebook/flow/blob/main/lib/react.js |
| 11 | export type ElementType = React$ElementType; |
| 12 | export type Element<+C> = React$Element<C>; |
| 13 | export type Key = React$Key; |
| 14 | export type Node = React$Node; |
| 15 | // eslint-disable-next-line no-undef |
| 16 | export type Context<T> = React.Context<T>; |
| 17 | export type Portal = React$Portal; |
| 18 | export type ElementProps<C> = React$ElementConfig<C>; |
| 19 | export type ElementConfig<C> = React$ElementConfig<C>; |
| 20 | // eslint-disable-next-line no-undef |
| 21 | export type ElementRef<C> = React.ElementRef<C>; |
| 22 | export type ChildrenArray<+T> = $ReadOnlyArray<ChildrenArray<T>> | T; |
| 23 | |
| 24 | // Export all exports so that they're available in tests. |
| 25 | // We can't use export * from in Flow for some reason. |
| 26 | export { |
| 27 | __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, |
| 28 | __COMPILER_RUNTIME, |
| 29 | Children, |
| 30 | Component, |
| 31 | Fragment, |
| 32 | Profiler, |
| 33 | PureComponent, |
| 34 | StrictMode, |
| 35 | Suspense, |
| 36 | cloneElement, |
| 37 | createContext, |
| 38 | createElement, |
| 39 | createRef, |
| 40 | use, |
| 41 | forwardRef, |
| 42 | isValidElement, |
| 43 | lazy, |
| 44 | memo, |
| 45 | cache, |
| 46 | cacheSignal, |
| 47 | startTransition, |
| 48 | unstable_LegacyHidden, |
| 49 | Activity, |
| 50 | ViewTransition, |
| 51 | addTransitionType, |
| 52 | unstable_Scope, |
| 53 | unstable_SuspenseList, |
| 54 | unstable_TracingMarker, |
| 55 | unstable_getCacheForType, |
| 56 | unstable_useCacheRefresh, |
| 57 | useId, |
| 58 | useCallback, |
| 59 | useContext, |
| 60 | useDebugValue, |
| 61 | useDeferredValue, |
| 62 | useEffect, |
| 63 | useEffectEvent, |
| 64 | useImperativeHandle, |
| 65 | useInsertionEffect, |
| 66 | useLayoutEffect, |
| 67 | useMemo, |
| 68 | useOptimistic, |
| 69 | useSyncExternalStore, |
| 70 | useReducer, |
| 71 | useRef, |
| 72 | useState, |
| 73 | useTransition, |
| 74 | useActionState, |
| 75 | version, |
| 76 | act, // DEV-only |
| 77 | captureOwnerStack, // DEV-only |
| 78 | } from './src/ReactClient'; |