-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript support #8
Comments
Can you please add a reproduction sample, maybe in SandBox? |
Hello there, I'm having the same problem. Is it possible to give please an example of how to use this package with react-ts. BTW, does it matter if I'm using react-leaflet 4.0.1? |
Hello, I'm also using LTS version of react-leaflet, 4.0.1 works just fine for me. 😊 Thanks 😊 |
Nice to hear that, I wish you good luck and I'll stay tuned! |
Hi, thought I might help with the types. Here's the PR. import { LeafletTrackingMarker, LeafletTrackingMarkerElement } from "react-leaflet-tracking-marker";
(...)
const markerRef = useRef<LeafletTrackingMarkerElement>(null);
(...)
<LeafletTrackingMarker ref={markerRef} /> |
Thank you for your contribution @tomszafr! I'm working on rewriting the whole thing with TypeScript, react-leaflet 4 and react 18...but I got stuck fixing a 'useContext' react hook error... I'm going to push my current changes in a separate branch if anyone is interested and can help me, it would be hugely appreciated 😁 |
Aloha :) |
Hello, @paveltretyakovru! Thank you for contributing, I wish to fully rewrite it with typescript but unfortunately my time is so limited.... I'm so glad people are contributing though. Thanks ! 😁 |
JSX element class does not support attributes because it does not have a 'props' property.
'LeafletTrackingMarker' cannot be used as a JSX component.
Its instance type 'LeafletTrackingMarker' is not a valid JSX element.
The text was updated successfully, but these errors were encountered: