fede4ka1245 / ymap3-components

React wrapper around ymaps v3
30 stars 1 forks source link

can't import clusterByGrid #1

Closed sunic3 closed 5 months ago

sunic3 commented 8 months ago

Can u add some utilities, for example clusterByGrid pls 😊

fede4ka1245 commented 8 months ago

Hey! Can add that only via context api.

The problem is that lib uses context API to render imported components, and import won't work for utils. But that will work via context api.

For now you can use reactify and ymaps from onLoad method in YMapComponentsProvider to load utils like that provided in their docs!

fede4ka1245 commented 6 months ago

Hello!

There is official library @yandex/ymaps3-clusterer: https://www.npmjs.com/package/@yandex/ymaps3-clusterer. You can import clusterByGrid from here!

Just like that: import { clusterByGrid } from "@yandex/ymaps3-clusterer";