简体   繁体   中英

How do I get WebStorm to recognize the React variable name?

React is included in my project, but WebStorm is not recognizing the variable name React when I'm using it in code (gets a squiggly underline). The code still runs and executes just fine. What do I need to do?

Add the react-DefinitelyTyped library to you JavaScript Libraries in WebStorm's preferences. Use the Download... button to search for it and then download it.

在此处输入图片说明

Just put your cursor over where you are getting the src and hit alt-enter. Webstorm will download it for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM