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

Function useLeafletContext

packages/core/src/context.ts:35–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33)
34
35export function useLeafletContext(): LeafletContextInterface {
36 const context = use(LeafletContext)
37 if (context == null) {
38 throw new Error(
39 'No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>',
40 )
41 }
42 return context
43}

Callers 9

ChildFunction · 0.90
context.tsxFile · 0.90
useMapFunction · 0.90
createControlledLayerFunction · 0.90
PaneComponentFunction · 0.90
createDivOverlayHookFunction · 0.85
createPathHookFunction · 0.85
createLayerHookFunction · 0.85
createControlHookFunction · 0.85

Calls

no outgoing calls

Tested by 1

ChildFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…