mapbox with functional component

A collection of 1 post

How to use mapbox-gl with React hooks

How to use mapbox-gl with React hooks

For a particular project I needed to instantiate the mapbox-gl.js library via a functional component instead of the usual way throughout a class component and a reference to the element you want