as a react component

git clone
git clone
mv demo-app2

In package.json:

  • remove devDependencies
  • Replace scripts with:
“scripts”: {
“start”: “react-scripts start”,
“build”: “react-scripts build”,
“predeploy”: “npm run build”,
“deploy”: “gh-pages -d build”,
“test”: “react-scripts test — env=jsdom”,
“eject”: “react-scripts eject”
In dependencies, set react-redux version "^5.0.7",

create public/index.html with contents from

create src/index.js, and set content to

in index.js, replace import store line with

import store from ‘./components/demo-app2/src/store’;

In ./src/components/demo-app2/src/app.j, sust before first import statement in add: /* eslint-disable import/first */

npm install --save dotenv

Add .env to demo-app with:

REACT_APP_MAPBOX_ACCESS_TOKEN= <your mapbox token>

To src/components/demo-app2/src/constants/default-settings.js,

change: MapboxAccessToken to REACT_APP_MAPBOX_ACCESS_TOKEN

T4D Software Lead at UNICEF, Sierra Leone