devtools icon indicating copy to clipboard operation
devtools copied to clipboard

fix: Poor performance with Nuxt-Mapbox & No access to map data (Circular JSON object)

Open AlexLavoie42 opened this issue 2 years ago â€ĸ 2 comments

🐛 The bug

When using devtools with the Nuxt-Mapbox module causes poor performance once the map is loaded. Data from the map stored with useState is not visible with this error shown in console: image

đŸ› ī¸ To reproduce

https://stackblitz.com/edit/github-mdpukv

🌈 Expected behavior

Expect the same performance with or without devtools, and be able to analyze the mapbox object in the devtools.

â„šī¸ Additional context

No response

AlexLavoie42 avatar Oct 18 '23 17:10 AlexLavoie42

would be great if someone can check this out, really sucks having to disable the devtools to test the map

Flowko avatar Apr 25 '24 19:04 Flowko

@Flowko I have a fix for this in the works with v1.6 of the module. There is a dev preview you can download.

It involved creating a custom state & reactivity system for the map, but has also brought the performance to be nearly identical to using vanilla mapbox. Unfortunately since this is such a large change it will most likely take me a while to ensure it is complete with no bugs.

AlexLavoie42 avatar Apr 25 '24 19:04 AlexLavoie42