Home >Development Tools >webstorm >Can webstorm build react projects?

Can webstorm build react projects?

藏色散人
藏色散人Original
2021-01-20 09:38:305074browse

Webstorm can build react projects. The construction method is: first install webstorm and configure it; then configure the node environment under webstorm; then install and execute "npm install -g create-react-app" under the terminal; finally Just create a new react.

Can webstorm build react projects?

The operating environment of this tutorial: windows7 system, webstorm2020.3&&react16.4.0 version, Dell G3 computer.

Recommended: "webstorm tutorial"

Create React project with webstorm

Download and install webstorm, and then configure it, the configuration is successful:

Can webstorm build react projects?

After successful configuration, you can start the webstorm project.

1: Configure the node environment under webstorm:

Can webstorm build react projects?

2: After completion:

React official scaffolding address:

https://github.com/facebook/create-react-app

Install and execute npm install -g create-react-app in the terminal. You don’t need to install it for every project. Just install a webstorm once

Can webstorm build react projects?

#3: You can create a new react app project directly.

Can webstorm build react projects?

Can webstorm build react projects?

4: As shown above: After the installation is completed: execute npm list -depath0 (check the downloaded dependencies that are not empty Package)

or npm ls (check all downloaded dependent packages including empty files)

Can webstorm build react projects?

Complete and open the entrance

Can webstorm build react projects?

5: Finally, you can complete your own react project by yourself

Can webstorm build react projects?

Note: there must be top-level package elements: if not, an error is reported

As shown below:

Can webstorm build react projects?

6: Initialization:

Create a new component folder. And create a header.js as shown below: The button controls the visibility of the content

The class Header after the abbreviated class must be capitalized. If you need to export it to other places for reference, you must export the default class

Can webstorm build react projects?

7: Reference to the exported component

Can webstorm build react projects?

8: Final result

Can webstorm build react projects?

9: Package and go online after the project is completed. The file uploaded by running yarn build is as shown below

Can webstorm build react projects?

The above is the detailed content of Can webstorm build react projects?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn