react-simple-maps
react-simple-maps copied to clipboard
Module '"react-simple-maps"' has no exported member 'useZoomPanContext'
I'm using react-simple-maps + @types/react-simple-maps v3.0.0.
useZoomPanContext and all the other hooks from the docs are missing from @types/react-simple-maps's type declarations.
How can I help to fix that @zimrick ?
Wow, good timing, I am facing the exact same problem.
@jbouhier Here, this worked for me:
// extraTypings.d.ts import * as ReactSimpleMaps from "react-simple-maps";
declare module "react-simple-maps" { export function useZoomPanContext(): {x: number; y: number; k: number; transformString: string;}; }
@richardfinegan I was looking for this workaround. Thank you!
@jbouhier Were you able to use useZoomPanContext() in your app? When I call const ctx = useZoomPanContext(), the return value is undefined.