As discussed in comment please refer below react guide .
Working with React
This article describes how to use the HERE Maps API for JavaScript with React. The target is to demonstrate how to build a React component that displays the map and responds to the actions of the user, be it direct interaction with the map or the other components.
Setup
For the fast setup of the new React application we will use the Create React App environment. It provides a fast way to get started building a new single-page application. Execute the npx runner as below (it requires Node >= 8.10 and npm >= 5.6):
npx create-react-app jsapi-react && cd jsapi-react
The call above produces the scaffolding needed to start the application. The directory structure in the jsapi-react
directory looks as follows. The React components reside in the src directory:
my-app
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│ ├── ...
└── src
├── App.css
├── App.js
├── App.test.js
├── index.css
├── index.js
├── logo.svg
└── serviceWorker.js
└── setupTests.js
The recommended way to use HERE Maps API for JavaScript within this environment is to install maps-api-for-javascript NPM package which is hosted at https://repo.platform.here.com/. Add a registry entry to the NPM configuration by executing the following command:
npm config set @here:registry https://repo.platform.here.com/artifactory/api/npm/maps-api-for-javascript/
After that the package from the @here
namespace can be installed as usual:
npm install @here/maps-api-for-javascript --save
At this step the environment setup is complete, all packages needed to build a sample application are installed, and it is possible to start the development server by executing:
npm start
The command above launches the development server with the "hot reload" functionality and opens the application in the browser.
For more details please refer below guide.
https://developer.here.com/documentation/maps/3.1.30.15/dev_guide/topics/react-practices.html