Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(...callArgs) => {
if (
Scheduler.unstable_getCurrentPriorityLevel() <
Scheduler.unstable_NormalPriority
) {
warning(
false,
'Relay: Unexpected call to `%s` at a priority higher than ' +
'expected on fragment `%s` in `%s`. It looks like you tried to ' +
'call `refetch` under a high priority update, but updates that ' +
'can cause the component to suspend should be scheduled at ' +
'normal priority. Make sure you are calling `refetch` inside ' +
'`startTransition()` from the `useSuspenseTransition()` hook.',
args.direction === 'forward' ? 'loadNext' : 'loadPrevious',
args.fragmentNode.name,
args.componentDisplayName,
);
}
return _loadMore(...callArgs);
if (isMountedRef.current !== true) {
warning(
false,
'Relay: Unexpected call to `refetch` on unmounted component for fragment ' +
'`%s` in `%s`. It looks like some instances of your component are ' +
'still trying to fetch data but they already unmounted. ' +
'Please make sure you clear all timers, intervals, ' +
'async calls, etc that may trigger a fetch.',
fragmentNode.name,
componentDisplayName,
);
return {dispose: () => {}};
}
if (
Scheduler.unstable_getCurrentPriorityLevel() <
Scheduler.unstable_NormalPriority
) {
warning(
false,
'Relay: Unexpected call to `refetch` at a priority higher than ' +
'expected on fragment `%s` in `%s`. It looks like you tried to ' +
'call `refetch` under a high priority update, but updates that ' +
'can cause the component to suspend should be scheduled at ' +
'normal priority. Make sure you are calling `refetch` inside ' +
'`startTransition()` from the `useSuspenseTransition()` hook.',
fragmentNode.name,
componentDisplayName,
);
}
if (parentFragmentRef == null) {
warning(
false,