Skip to content
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

[Bug] Property 'ref' does not exist on type 'IntrinsicAttributes & Omit<MarkerOptions, "map"> & MarkerEventProps'. #619

Closed
ivoberger opened this issue Nov 28, 2024 · 0 comments · Fixed by #620 or #621
Labels
bug Something isn't working

Comments

@ivoberger
Copy link

Description

Version 1.4.1 introduced a typescript issue with the Marker component. It now won't take a ref without throwing a type error. Says Property 'ref' does not exist on type 'IntrinsicAttributes & Omit<MarkerOptions, "map"> & MarkerEventProps'.

Steps to Reproduce

Pass a markerRef to the Marker component in a TS project.

import { Marker, useMarkerRef } from "@vis.gl/react-google-maps";

function MyMapComponent() {
  const [markerRef, marker] = useMarkerRef();
  return <Marker ref={markerRef} /*...otherProps*/ />
}

Environment

  • Library version: @vis.gl/[email protected]
  • Google maps version: weekly
  • Browser and Version:
  • OS:

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant