CARTO for React
CARTO for React is an application template to speed up the development of Location Intelligence (LI) Apps using the CARTO platform + React + deck.gl.
To quickly start a project locally, it's enough with:
npx create-react-app my-app --template @carto/base-3


CARTO 3 Sample App
It is based on Create React App, and it will allow you to start with a well designed structure and an integrated toolchain for testing, building, and deploying your application.
The code is open source and is available in the following repositories:
About Carto Platform Versions
In this documentation we use the term “CARTO 3†to refer to the latest version of the CARTO platform launched on October 2021, and “CARTO 2†to refer to the previous version. Note that each platform version has its own set of account credentials.
The latest CARTO for React version is 2.x. This version series is paired with MUI5. Regarding React support, from 2.0.4 both React 18 and React 17 are supported. In version 2.x only templates for CARTO 3 are available.
To work with previous version of Material UI (v4.x) and/or CARTO 2 version, user must use CARTO for React 1.x version series. The last stable release for MUI 4.x is 1.5 and there won't be any more active development on it, therefore migration to v2.x is recommended for all users.
The NPM packages (latest version) are linked below:
- Templates:
Package | Version | Downloads | Supported in |
---|---|---|---|
@carto/cra-template-base-3 (CARTO 3 template) | v1.5 and v2.0 | ||
@carto/cra-template-base-3-typescript (CARTO 3 template for TypeScript) | v1.5 and v2.0 | ||
@carto/cra-template-sample-app-3 (CARTO 3 template) | v1.5 and v2.0 | ||
@carto/cra-template-base-2 (CARTO 2 template) | only v1.5 | ||
@carto/cra-template-sample-app-2 (sample app template for CARTO 2) | only v1.5 |
- Lib packages:
Package | Version | Downloads |
---|---|---|
@carto/react-api | ||
@carto/react-auth | ||
@carto/react-basemaps | ||
@carto/react-core | ||
@carto/react-redux | ||
@carto/react-ui | ||
@carto/react-widgets | ||
@carto/react-workers |