react-globe
provides an intuitive way to transition markers when the underlying data changes. The transition pattern is based on Mike Bostock's general update pattern and uses the uniqueness of a marker's id
field to decide if it should be added, updated, or removed.
The example below demonstrates creating randomized markers:
Randomize markers
button to render an initial set of markers to the globe.Randomize markers
again. You will notice that there are no visual changes. This is because the markers, identified by id
, still exist on the globe.Remove marker
or Clear markers
button to observe how exit transitions are managed.Add marker
button.