dillon1000/react
Commit
Browse files Move useMemoCache outside of hook guards
The hook guards are incompatible with using a forget-runtime. Specifically, forget-runtime needs to make a call to `useState()` or some other hook to attach data to the fiber, but all the builtin hooks are overridden to disallow calling them outside of explicit boundaries. We'd either have to wrap the useMemoCache call in a push/pop to allow it to call other hooks, or as in this PR, just move it outside the enforcement.
Changed paths2 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/ReactiveScopes/CodegenReactiveFunction.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/flag-enable-emit-hook-guards.expect.md ModifiedPatch
Files changed
Rendering syntax-highlighted changes…