[forest] Turn off jsx memoization
Sathya Gunasekaran committed
Sep 1, 2023 at 11:24 UTC
403881c5489890b83a0460410ae7dbfc8ebb471e
1 file changed
+5
-3
compiler/packages/babel-plugin-react-forget/src/Entrypoint/Pipeline.ts
+5
-3
@@ -220,9 +220,11 @@ export function* run(
220
value: reactiveFunction,
221
});
222
223
- pruneNonEscapingScopes(reactiveFunction, {
224
- memoizeJsxElements: config?.memoizeJsxElements ?? true,
225
- });
223
+ let memoizeJsxElements = config?.memoizeJsxElements ?? true;
224
+ if (config?.enableForest) {
225
+ memoizeJsxElements = false;
226
+ }
227
+ pruneNonEscapingScopes(reactiveFunction, { memoizeJsxElements });
228
yield log({
229
kind: "reactive",
230
name: "PruneNonEscapingDependencies",