react-map-gl-typescript icon indicating copy to clipboard operation
react-map-gl-typescript copied to clipboard

:bomb: react-map-gl + create-react-app + typescript

:bomb: react-map-gl + create-react-app + typescript

This repository renders a full screen Mapbox map, powered by a Typescript create-react-appwithout ejecting!

full-screen mapbox

Clone the repository

$ git clone [email protected]:zackhsi/react-map-gl-typescript.git

Create an environment variable file with a Mapbox token

First, make sure you have a Mapbox account. From the Mapbox account page, create an access token and copy it. Then, create a .env.development.local file at the root of your repository. create-react-app will load it into process.env, as documented here.

$ cat << EOF > .env.development.local
REACT_APP_MAPBOX_TOKEN=your_mapbox_token
EOF

Install node modules

$ npm i

Start the app

$ npm run start