Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is react-scripts?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

The main content of this article is to explain "what is react-scripts". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what react-scripts is.

React-scripts is a set of scripts in the create-react-app starter package; create-react-app can start the project without configuration; react-scripts start can set up the development environment and start the server, and hot modules can be reloaded.

This article operating environment: Windows7 system, react17.0.1 version, Dell G3 computer.

What is react-scripts?

React-scripts is a set of scripts in the create-react-app starter package. Create-react-app helps you start the project without having to configure it, so you don't have to set up the project yourself.

React-scripts start sets up the development environment and starts the server, as well as hot module reloading. You can read here to understand what it has done for you.

With create-react-app, you can use the following features immediately.

React,JSX,ES6 and Flow syntax support.

Languages other than ES6, such as object propagation operators.

CSS for automatic prefixes, so you don't need-webkit- or other prefixes.

Fast interactive unit test runner with built-in support for coverage reporting.

Real-time development server warns of common errors.

A build script that bundles JS,CSS and images with hashes and source mappings for production.

Offline priority service workers and Web application manifests that meet all progressive Web application standards.

The above tools can be easily updated with a single dependency.

Npm script

Npm start is a shortcut to npm run start.

Npm run is used to run the script that you defined in the scriptspackage.json object

If there is no key in the start script object, it defaults to node server.js

Sometimes you want to do more than the react script can provide, in which case you can do react-scripts eject. This transitions your project from a "managed" state to an unmanaged state, where you have full control over dependencies, build scripts, and other configurations.

At this point, I believe you have a deeper understanding of "what react-scripts is", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report