Introduction to React Testing Library
Create React App Introduction: This guide walks you through setting up and running a React project using the Create React App. In the project directory, you can execute the following commands:
Development Commands
-
yarn start: Runs the app in development mode. Open it in your browser to view. Edits will trigger page reloads, and lint errors will display in the console.
-
yarn test: Launches the test runner in interactive watch mode. For more details, check the testing documentation.
Production Build
- yarn build: Builds the app for production, saving output to the
build
folder. It optimizes the build for best performance with minimized files and hashed file names. Your app will be ready for deployment!
Eject Command
- yarn eject: Note: This is a one-way action. Once you eject, you cannot revert. Use this if you're unsatisfied with the current build tool and configuration. It removes single-build dependencies and instead adds configuration files and dependencies like webpack, Babel, and ESLint directly into your project.
For further details, please refer to the respective documentation sections for each command.
119.4KB
文件大小:
评论区