Home >Web Front-end >JS Tutorial >What should I do if webstorm doesn't recognize react?

What should I do if webstorm doesn't recognize react?

coldplay.xixi
coldplay.xixiOriginal
2020-12-21 11:50:253071browse

Solution to webstorm not recognizing react: First click File in the menu bar, expand [Langu..& Frame..] on the left; then click the [JavaScript...] drop-down menu in the right panel , select JSX Harmony; finally click [Apply/OK].

What should I do if webstorm doesn't recognize react?

The operating environment of this tutorial: windows7 system, webstorm2020.3&&React17 version. This method is suitable for all brands of computers.

Related learning recommendations: react video tutorial

Solution to webstorm not recognizing react:

webstorm does not The main reason for identifying react's syntax is that it uses the .js suffix name, and there is jsx syntax in the code, which causes the editor not to recognize it. We can change it in the settings.

The specific solution steps are as follows:

  • Click File in the menu bar——Default Settings...

  • In Expand Languages ​​& Frameworks on the left - JavaScript

  • In the [JavaScript language version] drop-down menu in the right panel, select JSX Harmony

  • Click Apply/OK.

What should I do if webstorm doesnt recognize react?

Related learning recommendations: javascript video tutorial

The above is the detailed content of What should I do if webstorm doesn't recognize react?. 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