Home>Article>Web Front-end> How to solve the error problem when writing react code in webstrom

How to solve the error problem when writing react code in webstrom

藏色散人
藏色散人 Original
2021-01-21 09:28:46 2513browse

The solution to webstrom's error when writing react code: first open the webstrom software; then open the corresponding react file; and finally set the JavaScript version to "JSX Harmony".

How to solve the error problem when writing react code in webstrom

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

Related recommendations: "react tutorial"

Using reactjs syntax to report errors in WebStorm

How to solve the error problem when writing react code in webstrom

Set the JavaScript version to JSX Harmony. Generally, there will be a prompt for you to switch on the page where you write the react code. Just click the switch in the upper right corner;

If there is no prompt in the upper right corner, settings => ; Languages & Frameworks => JavaScript => Just change the JavaScript language version

The above is the detailed content of How to solve the error problem when writing react code in webstrom. 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