From 403881c5489890b83a0460410ae7dbfc8ebb471e Mon Sep 17 00:00:00 2001 From: Sathya Gunasekaran Date: Fri, 1 Sep 2023 11:24:19 +0100 Subject: [PATCH] [forest] Turn off jsx memoization --- .../babel-plugin-react-forget/src/Entrypoint/Pipeline.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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",