Overview:
CARTO for React is a development framework that combines the CARTO platform, React, and deck.gl to create Location Intelligence (LI) Apps. It is built on the popular toolchain Create React App and provides a well-designed structure and integrated toolchain for testing, building, and deploying applications.
Features:
- Integration of CARTO platform, React, and deck.gl
- Well-designed structure following best practices for frontend development
- Integrated toolchain for testing, building, and deploying applications
Installation:
To use CARTO for React, make sure you have a package manager (npm or yarn) installed. It is recommended to use yarn for better integration with external libraries.
To download the basic template for create-react-app, use the following command:
npm:
npx create-react-app my-app --template @carto/cra-template-base-3
Yarn:
yarn create react-app my-app --template @carto/cra-template-base-3
Note: Replace “my-app” with the desired name of your application.
Once the template is downloaded, you can start the development server:
npm:
cd my-app
npm start
Yarn:
cd my-app
yarn start
A full Sample Application with common functionality, deployed from the sample-app-3 template, is also available at https://sample-app-react.carto.com.
For more detailed information, guides, and a reference, visit the CARTO for React documentation page.
Summary:
CARTO for React is a powerful development framework that combines the capabilities of the CARTO platform, React, and deck.gl to create Location Intelligence Apps. It is based on the popular Create React App toolchain and provides a well-designed structure, integrated toolchain, and templates for easy development and deployment of applications.