- Using Mapbox with TS + React probably makes things way harder than it needs to be! This is because map state and react state needs to be in sync which means map and markers needs to go through
useState
and setup needs to be passed intouseEffect
. It all results in mapbox not behaving as you might expect.