@tanstack/react-query 4.1.3 → 4.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -354,6 +354,8 @@ function replaceData(prevData, data, options) {
354
354
  // Use prev data if an isDataEqual function is defined and returns `true`
355
355
  if (options.isDataEqual != null && options.isDataEqual(prevData, data)) {
356
356
  return prevData;
357
+ } else if (typeof options.structuralSharing === 'function') {
358
+ return options.structuralSharing(prevData, data);
357
359
  } else if (options.structuralSharing !== false) {
358
360
  // Structurally share data between prev and new data if needed
359
361
  return replaceEqualDeep(prevData, data);