0

In the example they use const { MarkerClusterer } = require("react-google-maps/lib/components/addons/MarkerClusterer"); , but I want to use import.

I tried using

import { MarkerClusterer } from 'react-google-maps/lib/components/addons/MarkerClusterer';

This did not seem to work for me, am I doing it wrong?

Taylor Austin
  • 5,407
  • 15
  • 58
  • 103

1 Answers1

0

Try this. It worked for me:

import { default as MarkerClusterer } from "react-google-maps/lib/components/addons/MarkerClusterer";

CaptainBli
  • 4,121
  • 4
  • 39
  • 58
Israel
  • 1,165
  • 11
  • 11