diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts index 1c471930f620d..ae7079a6c53e4 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts @@ -363,7 +363,7 @@ const REACT_APIS: Array<[string, BuiltInType]> = [ restParam: Effect.Freeze, returnType: { kind: "Poly" }, calleeEffect: Effect.Read, - hookKind: "useLayoutEffect", + hookKind: "useInsertionEffect", returnValueKind: ValueKind.Frozen, }, BuiltInUseInsertionEffectHookId diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts index 5aa19ed09b763..4f71c661549eb 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts @@ -123,6 +123,7 @@ export type HookKind = | "useRef" | "useEffect" | "useLayoutEffect" + | "useInsertionEffect" | "useMemo" | "useCallback" | "Custom";