1. 6
    Install Leaflet and react-leaflet with NPM in a JavaScript Project
    13s

Install Leaflet and react-leaflet with NPM in a JavaScript Project

Colby Fayock
InstructorColby Fayock
Share this video with your friends

Social Share Links

Send Tweet
Published 4 years ago
Updated 4 years ago

While there are a few options for building maps, Leaflet is the most popular. Lucky for us, Leaflet is also available as a ReactJS component library with React Leaflet. We'll use both Leaflet and React Leaflet to build a map in our React app.

To get started, we need to install:

Leaflet (npmjs.com) and React Leaflet (npmjs.com)

Click here for exercise instructions

Instructor: [0:00] In order to start adding our map, we need to install some dependencies. First, we're going to run npm install, and we may want to add leaflet and react-leaflet.

[0:06] Once we have those dependencies successfully installed, we should now see that inside of our package.json we have leaflet and react-leaflet. Now we are ready to add our map.

~ 2 years ago

Hi, I can't run the application because a lot of dependencies are deprecated. Hope, the author fixed that in his GitHub account.

Markdown supported.
Become a member to join the discussionEnroll Today