Skip to content

Commit

Permalink
Alias unstable_useMemoCache to useMemoCache
Browse files Browse the repository at this point in the history
  • Loading branch information
poteto committed Apr 25, 2023
1 parent b9beb67 commit 3124fcf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ let React;
let ReactTestRenderer;
let ReactDebugTools;
let act;
let useMemoCache;

describe('ReactHooksInspectionIntegration', () => {
beforeEach(() => {
Expand All @@ -22,6 +23,7 @@ describe('ReactHooksInspectionIntegration', () => {
ReactTestRenderer = require('react-test-renderer');
act = require('internal-test-utils').act;
ReactDebugTools = require('react-debug-tools');
useMemoCache = React.unstable_useMemoCache;
});

it('should inspect the current state of useState hooks', async () => {
Expand Down Expand Up @@ -636,7 +638,7 @@ describe('ReactHooksInspectionIntegration', () => {
// @gate enableUseMemoCacheHook
it('should support useMemoCache hook', () => {
function Foo() {
const $ = React.unstable_useMemoCache(1);
const $ = useMemoCache(1);
let t0;

if ($[0] === Symbol.for('react.memo_cache_sentinel')) {
Expand Down

0 comments on commit 3124fcf

Please sign in to comment.