Distance props
the elements that should be rendered when in visible range (min, max)
the maximum distance for which the child elements of this component is rendered
Optional
min?: numberthe minimal distance for which the child elements of this component is rendered
Optional
onDemand?: booleanif enabled, the child elements will only be loaded when within visible range, and will be unloaded/unmounted once it falls out of visible range
The Distance component can be used to conditionally render other components.
Example
Remarks
This component depends on a
DistanceContext
being provided by a parent component.See