React
React is a JavaScript library to build user interfaces (UI), which consist of small units like buttons, text, and images. React helps you combine them into reusable, nestable components. From web pages to mobile apps, all content on the screen can be broken down into components. It is mainly used to build interactive UI components in Single Page Applications.
If you want to quickly experience React, here are some templates based on React deployment:
You can also use Create React App to build React projects without learning and configuring a large number of build tools. Real-time page refresh helps you focus on code development and basic framework learning. It optimizes your bundle automatically during deployment. The following content introduces how to use Create React App to build projects and deploy 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
Deploy Project
Git Deployment
CLI Deployment
You can also install the scaffolding tool for Pages. For detailed installation and method of use, refer to EdgeOne CLI. Once configured, use the
edgeone pages deploy command to deploy project. During deployment, the CLI will first auto-build the project, then upload and publish the build artifacts.
