diff --git a/packages/react/src/ReactHooks.js b/packages/react/src/ReactHooks.js index 90b904bb42c75..95900e1d10fb5 100644 --- a/packages/react/src/ReactHooks.js +++ b/packages/react/src/ReactHooks.js @@ -229,7 +229,7 @@ export function useEffectEvent) => mixed>( return dispatcher.useEffectEvent(callback); } -export function useResourceEffect( +function useResourceEffect_( create: () => mixed, createDeps: Array | void | null, update: ((resource: mixed) => void) | void, @@ -250,6 +250,9 @@ export function useResourceEffect( ); } +export const useResourceEffect: typeof useResourceEffect_ | null = + enableUseResourceEffectHook ? useResourceEffect_ : null; + export function useOptimistic( passthrough: S, reducer: ?(S, A) => S,