Getting Started with Create React App
Create React App Introduction
The Create React App project is a streamlined way to set up a React environment for development. In the project directory, you can use the following commands:
-
yarn start
: Starts the application in development mode. Open it in your browser to view. Any edits will cause the page to reload, and lint errors will be shown in the console. -
yarn test
: Launches the test runner in interactive watch mode. See the relevant section for more information. -
yarn build
: Builds the application for production in thebuild
folder. It correctly bundles React in production mode and optimizes the build for best performance. The generated files are minimized and include hash values in the filenames. Your app is ready for deployment! Check the relevant section for more information. -
yarn eject
: Note: This is a one-way operation. After runningeject
, you can't go back! If you are unsatisfied with the default build tools and configurations, you can eject at any time. This command removes a single build dependency from your project and copies all configuration files and transitive dependencies (like webpack, Babel, etc.) directly into your project.
评论区