MCPcopy
hub / github.com/PaulLeCam/react-leaflet / createPathComponent

Function createPathComponent

packages/core/src/generic.ts:83–100  ·  view source on GitHub ↗
(
  createElement: (
    props: PropsWithoutRef<P>,
    context: LeafletContextInterface,
  ) => LeafletElement<E>,
  updateElement?: (
    instance: E,
    props: PropsWithoutRef<P>,
    prevProps: PropsWithoutRef<P>,
  ) => void,
)

Source from the content-addressed store, hash-verified

81}
82
83export function createPathComponent<
84 E extends FeatureGroup | Path,
85 P extends PathWithChildrenProps,
86>(
87 createElement: (
88 props: PropsWithoutRef<P>,
89 context: LeafletContextInterface,
90 ) => LeafletElement<E>,
91 updateElement?: (
92 instance: E,
93 props: PropsWithoutRef<P>,
94 prevProps: PropsWithoutRef<P>,
95 ) => void,
96) {
97 const useElement = createElementHook(createElement, updateElement)
98 const usePath = createPathHook(useElement)
99 return createContainerComponent(usePath)
100}
101
102export function createTileLayerComponent<E extends Layer, P extends LayerProps>(
103 createElement: (

Callers 8

generic.tsxFile · 0.90
FeatureGroup.tsxFile · 0.90
Polyline.tsxFile · 0.90
Rectangle.tsxFile · 0.90
GeoJSON.tsxFile · 0.90
Circle.tsxFile · 0.90
Polygon.tsxFile · 0.90
CircleMarker.tsxFile · 0.90

Calls 3

createElementHookFunction · 0.85
createPathHookFunction · 0.85
createContainerComponentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…