This repository renders a full screen Mapbox map, powered by a Typescript
create-react-app
—without ejecting!
$ git clone git@github.com:zackhsi/react-map-gl-typescript.git
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
$ npm i
$ npm run start