Table of Contents

Property StructuralSharing

Namespace
Velvet
Assembly
Velvet.Docs.dll

StructuralSharing

Chooses the data an entry holds when a request lands, from the data it held, null when it held none, and the data that arrived: TanStack Query's structuralSharing given as a function. When null, the data that arrived keeps the instance the entry held where the two are deeply equal and keeps the equal parts of it where they are not; (_, arrived) => arrived turns that off. The same choice is made between a result's data and what Select or PlaceholderData produces next. The values are boxed, as v5 hands its function unknown: a function is handed TQueryFnData values when it chooses the entry's data and TData values when it chooses the result's, and has to return the type it was handed. What counts as deeply equal is described in react-migration.md §1-2b.

public Func<object?, object, object>? StructuralSharing { get; init; }

Property Value

Func<object, object, object>