Skip to content

Commit 552900b

Browse files
author
Brian Vaughn
committed
PR feedback
• Changed tests to use pragma • Renamed feature flag
1 parent 32e5c1b commit 552900b

13 files changed

+177
-182
lines changed

packages/react-reconciler/src/ReactFiberHooks.new.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
enableNewReconciler,
2828
decoupleUpdatePriorityFromScheduler,
2929
enableDoubleInvokingEffects,
30-
enableUseRefMutationWarning,
30+
enableUseRefAccessWarning,
3131
} from 'shared/ReactFeatureFlags';
3232

3333
import {
@@ -1216,7 +1216,7 @@ function getCallerStackFrame(): string {
12161216

12171217
function mountRef<T>(initialValue: T): {|current: T|} {
12181218
const hook = mountWorkInProgressHook();
1219-
if (enableUseRefMutationWarning) {
1219+
if (enableUseRefAccessWarning) {
12201220
if (__DEV__) {
12211221
// Support lazy initialization pattern shown in docs.
12221222
// We need to store the caller stack frame so that we don't warn on subsequent renders.

packages/react-reconciler/src/ReactFiberHooks.old.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
enableSchedulingProfiler,
2727
enableNewReconciler,
2828
decoupleUpdatePriorityFromScheduler,
29-
enableUseRefMutationWarning,
29+
enableUseRefAccessWarning,
3030
} from 'shared/ReactFeatureFlags';
3131

3232
import {NoMode, BlockingMode, DebugTracingMode} from './ReactTypeOfMode';
@@ -1194,7 +1194,7 @@ function getCallerStackFrame(): string {
11941194

11951195
function mountRef<T>(initialValue: T): {|current: T|} {
11961196
const hook = mountWorkInProgressHook();
1197-
if (enableUseRefMutationWarning) {
1197+
if (enableUseRefAccessWarning) {
11981198
if (__DEV__) {
11991199
// Support lazy initialization pattern shown in docs.
12001200
// We need to store the caller stack frame so that we don't warn on subsequent renders.

0 commit comments

Comments
 (0)