File tree Expand file tree Collapse file tree 3 files changed +3
-24
lines changed Expand file tree Collapse file tree 3 files changed +3
-24
lines changed Original file line number Diff line number Diff line change @@ -169,12 +169,7 @@ hook useLoadMoreFunction_CURRENT<TVariables: Variables>(
169
169
170
170
const fragmentSelector = getSelector ( fragmentNode , fragmentRef ) ;
171
171
172
- const isRequestInvalidCheck =
173
- RelayFeatureFlags . OPTIMIZE_RECREATING_LOAD_MORE_FUNCTION
174
- ? isRequestInvalid
175
- : fragmentData == null || isParentQueryActive ;
176
-
177
- if ( isFetchingRef . current === true || isRequestInvalidCheck ) {
172
+ if ( isFetchingRef . current === true || isRequestInvalid ) {
178
173
if ( fragmentSelector == null ) {
179
174
warning (
180
175
false ,
@@ -276,9 +271,6 @@ hook useLoadMoreFunction_CURRENT<TVariables: Variables>(
276
271
completeFetch ,
277
272
isFetchingRef ,
278
273
isRequestInvalid ,
279
- ...( RelayFeatureFlags . OPTIMIZE_RECREATING_LOAD_MORE_FUNCTION
280
- ? [ isRequestInvalid ]
281
- : [ isParentQueryActive , fragmentData ] ) ,
282
274
fragmentNode . name ,
283
275
fragmentRef ,
284
276
componentDisplayName ,
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ const invariant = require('invariant');
31
31
const { useCallback, useRef, useState} = require ( 'react' ) ;
32
32
const {
33
33
__internal : { fetchQuery} ,
34
- RelayFeatureFlags,
35
34
createOperationDescriptor,
36
35
getPaginationVariables,
37
36
getRefetchMetadata,
@@ -168,12 +167,7 @@ hook useLoadMoreFunction_EXPERIMENTAL<TVariables: Variables>(
168
167
169
168
const fragmentSelector = getSelector ( fragmentNode , fragmentRef ) ;
170
169
171
- const isRequestInvalidCheck =
172
- RelayFeatureFlags . OPTIMIZE_RECREATING_LOAD_MORE_FUNCTION
173
- ? isRequestInvalid
174
- : fragmentData == null || isParentQueryActive ;
175
-
176
- if ( fetchStatusRef . current . kind === 'fetching' || isRequestInvalidCheck ) {
170
+ if ( fetchStatusRef . current . kind === 'fetching' || isRequestInvalid ) {
177
171
if ( fragmentSelector == null ) {
178
172
warning (
179
173
false ,
@@ -272,9 +266,7 @@ hook useLoadMoreFunction_EXPERIMENTAL<TVariables: Variables>(
272
266
identifierValue ,
273
267
direction ,
274
268
cursor ,
275
- ...( RelayFeatureFlags . OPTIMIZE_RECREATING_LOAD_MORE_FUNCTION
276
- ? [ isRequestInvalid ]
277
- : [ isParentQueryActive , fragmentData ] ) ,
269
+ isRequestInvalid ,
278
270
fragmentNode . name ,
279
271
fragmentRef ,
280
272
componentDisplayName ,
Original file line number Diff line number Diff line change @@ -55,10 +55,6 @@ export type FeatureFlags = {
55
55
// Temporary flag to experiment to enable compatibility with React's unstable <Activity> API
56
56
ENABLE_ACTIVITY_COMPATIBILITY : boolean ,
57
57
58
- // Enables optimization for recreating the load more function.
59
- // When enabled, this flag reduce and simplify amount of dependencies for the function loadMore
60
- OPTIMIZE_RECREATING_LOAD_MORE_FUNCTION : boolean ,
61
-
62
58
// Adds a prefix to the storage key of read time resolvers. This is used to
63
59
// disambiguate the same resolver being used at both read time and exec time.
64
60
ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX : boolean ,
@@ -90,7 +86,6 @@ const RelayFeatureFlags: FeatureFlags = {
90
86
ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE : false ,
91
87
PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION : false ,
92
88
MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD : false ,
93
- OPTIMIZE_RECREATING_LOAD_MORE_FUNCTION : false ,
94
89
ENABLE_CYLE_DETECTION_IN_VARIABLES : false ,
95
90
ENABLE_ACTIVITY_COMPATIBILITY : false ,
96
91
ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX : true ,
You can’t perform that action at this time.
0 commit comments