Skip to content

React + Mapbox example using React hooks to display Minnesota's eight congressional districts

Notifications You must be signed in to change notification settings

clintmcmahon/react-mapbox-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React + Mapbox Example

React + Mapbox example to display Minnesota's eight congressional districts. This project is an example of how to display data in geojson format in Mapbox utilizing React hooks. This project is also bootstrapped with Create React App.

Usage

Create a Mapbox user account and Mapbox API token at Mapbox

Clone the repository to your local machine

Add your Mapbox API Token to the global variable in the .env file

  • REACT_APP_MAPBOX_KEY=YOUR_MAPBOX_KEY

Install node modules

  • npm install

Run the project

  • npm start a new browser window will appear running the project.