joeyp
joeyp

Reputation: 111

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?

Upvotes: 0

Views: 315

Answers (2)

Shawn
Shawn

Reputation: 89

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.

enter image description here

Upvotes: 1

pwcremin
pwcremin

Reputation: 755

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

Upvotes: 0

Related Questions