@@ -1060,12 +1060,12 @@ function updateWorkInProgressHook(): Hook {
10601060
10611061function unstable_useContextWithBailout < T > (
10621062 context : ReactContext < T > ,
1063- compare : ( T => Array < mixed > ) | null ,
1063+ select : ( T => Array < mixed > ) | null ,
10641064) : T {
1065- if ( compare === null ) {
1065+ if ( select === null ) {
10661066 return readContext ( context ) ;
10671067 }
1068- return readContextAndCompare ( context , compare ) ;
1068+ return readContextAndCompare ( context , select ) ;
10691069}
10701070
10711071// NOTE: defining two versions of this function to avoid size impact when this feature is disabled.
@@ -4054,11 +4054,11 @@ if (__DEV__) {
40544054 ( HooksDispatcherOnMountInDEV : Dispatcher ) . unstable_useContextWithBailout =
40554055 function < T > (
40564056 context: ReactContext< T > ,
4057- compare : (T => Array < mixed > ) | null ,
4057+ select : (T => Array < mixed > ) | null ,
40584058 ) : T {
40594059 currentHookNameInDev = 'useContext' ;
40604060 mountHookTypesDev ( ) ;
4061- return unstable_useContextWithBailout ( context , compare ) ;
4061+ return unstable_useContextWithBailout ( context , select ) ;
40624062 } ;
40634063 }
40644064
@@ -4246,11 +4246,11 @@ if (__DEV__) {
42464246 ( HooksDispatcherOnMountWithHookTypesInDEV : Dispatcher ) . unstable_useContextWithBailout =
42474247 function < T > (
42484248 context: ReactContext< T > ,
4249- compare : (T => Array < mixed > ) | null ,
4249+ select : (T => Array < mixed > ) | null ,
42504250 ) : T {
42514251 currentHookNameInDev = 'useContext' ;
42524252 updateHookTypesDev ( ) ;
4253- return unstable_useContextWithBailout ( context , compare ) ;
4253+ return unstable_useContextWithBailout ( context , select ) ;
42544254 } ;
42554255 }
42564256
@@ -4437,11 +4437,11 @@ if (__DEV__) {
44374437 ( HooksDispatcherOnUpdateInDEV : Dispatcher ) . unstable_useContextWithBailout =
44384438 function < T > (
44394439 context: ReactContext< T > ,
4440- compare : (T => Array < mixed > ) | null ,
4440+ select : (T => Array < mixed > ) | null ,
44414441 ) : T {
44424442 currentHookNameInDev = 'useContext' ;
44434443 updateHookTypesDev ( ) ;
4444- return unstable_useContextWithBailout ( context , compare ) ;
4444+ return unstable_useContextWithBailout ( context , select ) ;
44454445 } ;
44464446 }
44474447
@@ -4628,11 +4628,11 @@ if (__DEV__) {
46284628 ( HooksDispatcherOnUpdateInDEV : Dispatcher ) . unstable_useContextWithBailout =
46294629 function < T > (
46304630 context: ReactContext< T > ,
4631- compare : (T => Array < mixed > ) | null ,
4631+ select : (T => Array < mixed > ) | null ,
46324632 ) : T {
46334633 currentHookNameInDev = 'useContext' ;
46344634 updateHookTypesDev ( ) ;
4635- return unstable_useContextWithBailout ( context , compare ) ;
4635+ return unstable_useContextWithBailout ( context , select ) ;
46364636 } ;
46374637 }
46384638
@@ -4845,12 +4845,12 @@ if (__DEV__) {
48454845 ( HooksDispatcherOnUpdateInDEV : Dispatcher ) . unstable_useContextWithBailout =
48464846 function < T > (
48474847 context: ReactContext< T > ,
4848- compare : (T => Array < mixed > ) | null ,
4848+ select : (T => Array < mixed > ) | null ,
48494849 ) : T {
48504850 currentHookNameInDev = 'useContext' ;
48514851 warnInvalidHookAccess ( ) ;
48524852 mountHookTypesDev ( ) ;
4853- return unstable_useContextWithBailout ( context , compare ) ;
4853+ return unstable_useContextWithBailout ( context , select ) ;
48544854 } ;
48554855 }
48564856
@@ -5063,12 +5063,12 @@ if (__DEV__) {
50635063 ( InvalidNestedHooksDispatcherOnUpdateInDEV : Dispatcher ) . unstable_useContextWithBailout =
50645064 function < T > (
50655065 context: ReactContext< T > ,
5066- compare : (T => Array < mixed > ) | null ,
5066+ select : (T => Array < mixed > ) | null ,
50675067 ) : T {
50685068 currentHookNameInDev = 'useContext' ;
50695069 warnInvalidHookAccess ( ) ;
50705070 updateHookTypesDev ( ) ;
5071- return unstable_useContextWithBailout ( context , compare ) ;
5071+ return unstable_useContextWithBailout ( context , select ) ;
50725072 } ;
50735073 }
50745074
@@ -5281,12 +5281,12 @@ if (__DEV__) {
52815281 ( InvalidNestedHooksDispatcherOnRerenderInDEV : Dispatcher ) . unstable_useContextWithBailout =
52825282 function < T > (
52835283 context: ReactContext< T > ,
5284- compare : (T => Array < mixed > ) | null ,
5284+ select : (T => Array < mixed > ) | null ,
52855285 ) : T {
52865286 currentHookNameInDev = 'useContext' ;
52875287 warnInvalidHookAccess ( ) ;
52885288 updateHookTypesDev ( ) ;
5289- return unstable_useContextWithBailout ( context , compare ) ;
5289+ return unstable_useContextWithBailout ( context , select ) ;
52905290 } ;
52915291 }
52925292}
0 commit comments