React
React is a JavaScript library for building user interfaces (UI), which consist of small units like buttons, text, and images. React helps you combine them into reusable, nestable components. Everything on the screen, from web pages to mobile applications, can be broken down into components. It is primarily used to build interactive UI components for Single Page Applications (SPA).
If you want to quickly try React, here are some templates based on React deployment:
You can also use Create React App to build React projects without the need to learn and configure a large number of build tools. Real-time page refresh lets you focus on code development and framework basics. During deployment, it automatically optimizes your bundle. The following content will introduce how to use Create React App to build a project and deploy it to EdgeOne Pages.
Creating a React App
Create React App is an officially supported React application creation method with zero configuration, suitable for quick start.
1. Ensure Node.js is installed (recommended version ≥ 18).
2. Run in the terminal:
npx create-react-app my-react-app
3. Enter the project and start up:
cd my-react-appnpm start
Deploying a Project
Deploying with Git
Deploying with CLI
You can also install the scaffolding tool for Pages. For detailed installation and usage, refer to EdgeOne CLI. Once configured, use the
edgeone pages deploy command to deploy the project. During deployment, the CLI will first auto-build the project, then upload and publish the build artifacts.
