Skip to main content

Installation

What you'll need

  • Node.js version 16.14 or above:
    • When installing Node.js, you are recommended to check all checkboxes related to dependencies.

Start a new React project

If you have a project created, go to next step. In otherwise start a new project by ussing anything of this options:

  • Starting a new project with create react app:

    npx create-react-app <your-project-name>
    installation tip

    We recomended add Typscript in your project. In this case run this command instead:

    npx create-react-app <your-project-name> --template typescript
  • Starting a new project by using Next:

    npx create-next-app <your-project-name>
installation methods

This documentation use create react app and Next to get started a react project,but you can use anything other method.

Install dependencies

Once you has created a react project, its time to install the dependencies that React Maptalks need to wotk:

npm install maptalks --save

If you are ussing ts:

npm install @types/maptalks --save-dev

Install React Maptalks:

npm install react-maptalks-ts