Skip to content
Discussion options

You must be logged in to vote

It's not working without a ref:

import React, { useRef } from 'react';
import {
  GoogleMapsView,
  type GoogleMapsViewRef,
} from 'react-native-google-maps-plus';
import { callback } from 'react-native-nitro-modules';

const mapRef = useRef<GoogleMapsViewRef | null>(null);

return (
  <GoogleMapsView
    hybridRef={callback((ref) => {
      mapRef.current = ref;
    })}
  />
);

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by basitmir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants