-
Notifications
You must be signed in to change notification settings - Fork 5
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
Issue with refs + Typescript (TiledMapLayer) #15
Comments
Thanks for opening the issue, and providing code. If you could create a codesandbox demonstrating the issue, it would be immensely helpful. I am extremely busy and have very little time to recreate issues, but if you can present me with the issue in a sandbox, I can take a look, thanks. |
@slutske22 thanks for the prompt reply. Here's a minimal example: https://stackblitz.com/edit/vitejs-vite-vrfcaw?file=src/App.tsx You should be able to see the TypeScript issue on line 18. In my own code, I'm just currently doing a Thanks in advance. (note this code editor only seems to work well in Chrome, not Firefox) |
I see the issue. I think I know what the problem is - I've wrapped the return value of the ref in forwardRef in
Not sure when I can push a new version with the fix, I'll leave this open for now. |
@slutske22 thanks for the workaround. No rush as it's not blocking me. If I have any time I may look into it as well, if you're open to contributions. |
This is fixed in version 2, which is currently in a @next version. You can try it out here: https://www.npmjs.com/package/react-esri-leaflet/v/2.0.0, |
Perhaps related to this issue, I'm having some issues with refs andTiledMapLayer. Minimal example of my code is below:
Perhaps my tsconfig is too strict...but I'm receiving the following error:
Is there something going on with the way forwardRef is being used? Let me know if there's any more information I can provide.
Thanks -- and great work on this project!
The text was updated successfully, but these errors were encountered: