Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
• Changed tests to use pragma
• Renamed feature flag
  • Loading branch information
Brian Vaughn committed Oct 19, 2020
1 parent 32e5c1b commit 552900b
Show file tree
Hide file tree
Showing 13 changed files with 177 additions and 182 deletions.
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactFiberHooks.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
enableNewReconciler,
decoupleUpdatePriorityFromScheduler,
enableDoubleInvokingEffects,
enableUseRefMutationWarning,
enableUseRefAccessWarning,
} from 'shared/ReactFeatureFlags';

import {
Expand Down Expand Up @@ -1216,7 +1216,7 @@ function getCallerStackFrame(): string {

function mountRef<T>(initialValue: T): {|current: T|} {
const hook = mountWorkInProgressHook();
if (enableUseRefMutationWarning) {
if (enableUseRefAccessWarning) {
if (__DEV__) {
// Support lazy initialization pattern shown in docs.
// We need to store the caller stack frame so that we don't warn on subsequent renders.
Expand Down
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactFiberHooks.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
enableSchedulingProfiler,
enableNewReconciler,
decoupleUpdatePriorityFromScheduler,
enableUseRefMutationWarning,
enableUseRefAccessWarning,
} from 'shared/ReactFeatureFlags';

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

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

0 comments on commit 552900b

Please sign in to comment.