(
createElement: (
props: PropsWithoutRef<P>,
context: LeafletContextInterface,
) => LeafletElement<E>,
updateElement?: (
instance: E,
props: PropsWithoutRef<P>,
prevProps: PropsWithoutRef<P>,
) => void,
)
| 81 | } |
| 82 | |
| 83 | export 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 | |
| 102 | export function createTileLayerComponent<E extends Layer, P extends LayerProps>( |
| 103 | createElement: ( |
no test coverage detected
searching dependent graphs…