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 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternals';
    
  11. export {
    
  12.   createPortal,
    
  13.   createRoot,
    
  14.   hydrateRoot,
    
  15.   findDOMNode,
    
  16.   flushSync,
    
  17.   hydrate,
    
  18.   render,
    
  19.   unmountComponentAtNode,
    
  20.   unstable_batchedUpdates,
    
  21.   unstable_renderSubtreeIntoContainer,
    
  22.   unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
    
  23.   useFormStatus,
    
  24.   useFormState,
    
  25.   prefetchDNS,
    
  26.   preconnect,
    
  27.   preload,
    
  28.   preloadModule,
    
  29.   preinit,
    
  30.   preinitModule,
    
  31.   version,
    
  32. } from './src/client/ReactDOM';
    
  33. 
    
  34. import type {Awaited} from 'shared/ReactTypes';
    
  35. import type {FormStatus} from 'react-dom-bindings/src/shared/ReactDOMFormActions';
    
  36. import {useFormStatus, useFormState} from './src/client/ReactDOM';
    
  37. 
    
  38. export function experimental_useFormStatus(): FormStatus {
    
  39.   if (__DEV__) {
    
  40.     console.error(
    
  41.       'useFormStatus is now in canary. Remove the experimental_ prefix. ' +
    
  42.         'The prefixed alias will be removed in an upcoming release.',
    
  43.     );
    
  44.   }
    
  45.   return useFormStatus();
    
  46. }
    
  47. 
    
  48. export function experimental_useFormState<S, P>(
    
  49.   action: (Awaited<S>, P) => S,
    
  50.   initialState: Awaited<S>,
    
  51.   permalink?: string,
    
  52. ): [Awaited<S>, (P) => void] {
    
  53.   if (__DEV__) {
    
  54.     console.error(
    
  55.       'useFormState is now in canary. Remove the experimental_ prefix. ' +
    
  56.         'The prefixed alias will be removed in an upcoming release.',
    
  57.     );
    
  58.   }
    
  59.   return useFormState(action, initialState, permalink);
    
  60. }