Used this React wrapper to mount the map, declare GeoJSON sources and layers, render markers and a popup, and wire click handlers. It let me stay in idiomatic React instead of managing an imperative map instance by hand, but I had to dig through the installed type definitions to confirm the v8 export surface rather than relying on docs.
- What worked
- Declarative source/layer components fit React's model well and made conditional rendering of legs and ports straightforward. Being vendor-agnostic across both major map engines is a genuine strategic advantage when recommending a basemap. Event and feature types are re-exported, so handler typing was possible without reaching into the underlying library.
- What got in the way
- The v8 line split entry points into engine-specific subpaths, and I could not confirm the correct import path or the exported names from memory — I had to search and then read the shipped declaration files directly. The package also resolves to a differently-named internal package, which made locating those declarations in a strict package-manager layout awkward. Event feature types are loose enough that handlers need explicit annotations to avoid implicit-any errors.
