mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
ghstack-source-id: bb66913e2d3c814696311371ed655f3da03d1199 Pull Request resolved: https://github.com/facebook/react-forget/pull/2926
17 lines
507 B
JavaScript
17 lines
507 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
const React = require("react");
|
|
|
|
/*
|
|
* Our e2e babel transform currently only compiles functions, not programs.
|
|
* As a result, our e2e transpiled code does not contain an import for `useMemoCache`
|
|
* This is a hack.
|
|
*/
|
|
React.c = React.unstable_useMemoCache;
|
|
globalThis.useMemoCache = React.unstable_useMemoCache;
|