diff --git a/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Pipeline.ts b/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Pipeline.ts index 1c143cbe9c..f86743c1c3 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Pipeline.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Pipeline.ts @@ -220,9 +220,11 @@ export function* run( value: reactiveFunction, }); - pruneNonEscapingScopes(reactiveFunction, { - memoizeJsxElements: config?.memoizeJsxElements ?? true, - }); + let memoizeJsxElements = config?.memoizeJsxElements ?? true; + if (config?.enableForest) { + memoizeJsxElements = false; + } + pruneNonEscapingScopes(reactiveFunction, { memoizeJsxElements }); yield log({ kind: "reactive", name: "PruneNonEscapingDependencies",