Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Clean up vestige of useOpaqueIdentifier
Found some code that was left over from the experimental
useOpaqueIdentifier hook, which we eventually replaced with useId.

This deletes it.
  • Loading branch information
acdlite committed Oct 30, 2022
commit 6e39da8feefbdf62cf747946ba0ea9bcb831b545
9 changes: 0 additions & 9 deletions packages/react-reconciler/src/ReactFiberHooks.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,6 @@ export function resetHooksAfterThrow(): void {
hookTypesUpdateIndexDev = -1;

currentHookNameInDev = null;

isUpdatingOpaqueValueInRenderPhase = false;
}

didScheduleRenderPhaseUpdateDuringThisPass = false;
Expand Down Expand Up @@ -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();

Expand Down
9 changes: 0 additions & 9 deletions packages/react-reconciler/src/ReactFiberHooks.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,6 @@ export function resetHooksAfterThrow(): void {
hookTypesUpdateIndexDev = -1;

currentHookNameInDev = null;

isUpdatingOpaqueValueInRenderPhase = false;
}

didScheduleRenderPhaseUpdateDuringThisPass = false;
Expand Down Expand Up @@ -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();

Expand Down
6 changes: 1 addition & 5 deletions packages/react-reconciler/src/ReactFiberWorkLoop.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ import {resetContextDependencies} from './ReactFiberNewContext.new';
import {
resetHooksAfterThrow,
ContextOnlyDispatcher,
getIsUpdatingOpaqueValueInRenderPhaseInDEV,
} from './ReactFiberHooks.new';
import {DefaultCacheDispatcher} from './ReactFiberCache.new';
import {
Expand Down Expand Up @@ -3638,10 +3637,7 @@ if (__DEV__) {

function warnAboutRenderPhaseUpdatesInDEV(fiber) {
if (__DEV__) {
if (
ReactCurrentDebugFiberIsRenderingInDEV &&
!getIsUpdatingOpaqueValueInRenderPhaseInDEV()
) {
if (ReactCurrentDebugFiberIsRenderingInDEV) {
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
Expand Down
6 changes: 1 addition & 5 deletions packages/react-reconciler/src/ReactFiberWorkLoop.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ import {resetContextDependencies} from './ReactFiberNewContext.old';
import {
resetHooksAfterThrow,
ContextOnlyDispatcher,
getIsUpdatingOpaqueValueInRenderPhaseInDEV,
} from './ReactFiberHooks.old';
import {DefaultCacheDispatcher} from './ReactFiberCache.old';
import {
Expand Down Expand Up @@ -3638,10 +3637,7 @@ if (__DEV__) {

function warnAboutRenderPhaseUpdatesInDEV(fiber) {
if (__DEV__) {
if (
ReactCurrentDebugFiberIsRenderingInDEV &&
!getIsUpdatingOpaqueValueInRenderPhaseInDEV()
) {
if (ReactCurrentDebugFiberIsRenderingInDEV) {
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
Expand Down