mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
- Updated all directly defined dependencies to the latest React 19 Beta - `package.json`: used `resolutions` to force React 19 for `react-is` transitive dependency - `package.json`: postinstall script to patch fbt for the React 19 element Symbol - Match on the message in Snap to exclude a React 19 warning that `act` should be imported from `react` instead (from inside `@testing-library/react`) - Some updated snapshots, I think due to now recovering behavior of `useMemoCache`, please review. In a next step, we can do the following. I excluded it since it from here as it made the PR unreviewable on GitHub. - Snapshots now use `react/compiler-runtime` as in prod, so the different default in Snap is no longer needed.
16 lines
495 B
JavaScript
16 lines
495 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 ReactCompilerRuntime = require("react/compiler-runtime");
|
|
|
|
/*
|
|
* 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.
|
|
*/
|
|
globalThis.useMemoCache = ReactCompilerRuntime.c;
|