mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Clean up vestige of useOpaqueIdentifier (#25587)
Found some code that was left over from the experimental useOpaqueIdentifier hook, which we eventually replaced with useId. This deletes it.
This commit is contained in:
committed by
Rick Hanlon
parent
a5629e96ba
commit
6de70ef00a
@@ -767,8 +767,6 @@ export function resetHooksAfterThrow(): void {
|
||||
hookTypesUpdateIndexDev = -1;
|
||||
|
||||
currentHookNameInDev = null;
|
||||
|
||||
isUpdatingOpaqueValueInRenderPhase = false;
|
||||
}
|
||||
|
||||
didScheduleRenderPhaseUpdateDuringThisPass = false;
|
||||
@@ -2380,13 +2378,6 @@ function rerenderTransition(): [
|
||||
return [isPending, start];
|
||||
}
|
||||
|
||||
let isUpdatingOpaqueValueInRenderPhase = false;
|
||||
export function getIsUpdatingOpaqueValueInRenderPhaseInDEV(): boolean | void {
|
||||
if (__DEV__) {
|
||||
return isUpdatingOpaqueValueInRenderPhase;
|
||||
}
|
||||
}
|
||||
|
||||
function mountId(): string {
|
||||
const hook = mountWorkInProgressHook();
|
||||
|
||||
|
||||
@@ -767,8 +767,6 @@ export function resetHooksAfterThrow(): void {
|
||||
hookTypesUpdateIndexDev = -1;
|
||||
|
||||
currentHookNameInDev = null;
|
||||
|
||||
isUpdatingOpaqueValueInRenderPhase = false;
|
||||
}
|
||||
|
||||
didScheduleRenderPhaseUpdateDuringThisPass = false;
|
||||
@@ -2380,13 +2378,6 @@ function rerenderTransition(): [
|
||||
return [isPending, start];
|
||||
}
|
||||
|
||||
let isUpdatingOpaqueValueInRenderPhase = false;
|
||||
export function getIsUpdatingOpaqueValueInRenderPhaseInDEV(): boolean | void {
|
||||
if (__DEV__) {
|
||||
return isUpdatingOpaqueValueInRenderPhase;
|
||||
}
|
||||
}
|
||||
|
||||
function mountId(): string {
|
||||
const hook = mountWorkInProgressHook();
|
||||
|
||||
|
||||
@@ -205,7 +205,6 @@ import {resetContextDependencies} from './ReactFiberNewContext.new';
|
||||
import {
|
||||
resetHooksAfterThrow,
|
||||
ContextOnlyDispatcher,
|
||||
getIsUpdatingOpaqueValueInRenderPhaseInDEV,
|
||||
} from './ReactFiberHooks.new';
|
||||
import {DefaultCacheDispatcher} from './ReactFiberCache.new';
|
||||
import {
|
||||
@@ -3638,10 +3637,7 @@ if (__DEV__) {
|
||||
|
||||
function warnAboutRenderPhaseUpdatesInDEV(fiber) {
|
||||
if (__DEV__) {
|
||||
if (
|
||||
ReactCurrentDebugFiberIsRenderingInDEV &&
|
||||
!getIsUpdatingOpaqueValueInRenderPhaseInDEV()
|
||||
) {
|
||||
if (ReactCurrentDebugFiberIsRenderingInDEV) {
|
||||
switch (fiber.tag) {
|
||||
case FunctionComponent:
|
||||
case ForwardRef:
|
||||
|
||||
@@ -205,7 +205,6 @@ import {resetContextDependencies} from './ReactFiberNewContext.old';
|
||||
import {
|
||||
resetHooksAfterThrow,
|
||||
ContextOnlyDispatcher,
|
||||
getIsUpdatingOpaqueValueInRenderPhaseInDEV,
|
||||
} from './ReactFiberHooks.old';
|
||||
import {DefaultCacheDispatcher} from './ReactFiberCache.old';
|
||||
import {
|
||||
@@ -3638,10 +3637,7 @@ if (__DEV__) {
|
||||
|
||||
function warnAboutRenderPhaseUpdatesInDEV(fiber) {
|
||||
if (__DEV__) {
|
||||
if (
|
||||
ReactCurrentDebugFiberIsRenderingInDEV &&
|
||||
!getIsUpdatingOpaqueValueInRenderPhaseInDEV()
|
||||
) {
|
||||
if (ReactCurrentDebugFiberIsRenderingInDEV) {
|
||||
switch (fiber.tag) {
|
||||
case FunctionComponent:
|
||||
case ForwardRef:
|
||||
|
||||
Reference in New Issue
Block a user