Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebStorm/PhpStorm warning for react attributes in jsx like className

I can not remove following warning in react code. "Attribute className is not allowed here".

  • Warning in PhpStorm

warning in PhpStorm

  • Unknown HTML tag attribute can not be set to camelcase only lower case is saved, and turning the check off is not helping.

Unknown HTML tag attribute can not be set to camelcase only lower case is saved, and turning the check off is not helping

  • Settings in Languages & Frameworks > JavaScript > Libraries

Settings in Languages & Frameworks > JavaScript > Libraries

Can you help me I have warnings for every attribute in jsx. Editor is set jsx harmony.

like image 846
Marcel Mandatory Avatar asked Mar 21 '16 08:03

Marcel Mandatory


3 Answers

My problem with warnings in jsx was solved by instaling React-Template plugin.

React-Templates

like image 73
Marcel Mandatory Avatar answered Nov 20 '22 08:11

Marcel Mandatory


You should add Reactjs library.

Using Reactjs in JavaScript and TypeScript

In my case, I've just added Reactjs support for TypeScript:

Languages & Frameworks / JavaScript / Libraries / Download

like image 37
Eugene Bashmakov Avatar answered Nov 20 '22 08:11

Eugene Bashmakov


I'm a little late on the scene but performing Invalidate Caches/Restart... solved the issue (after switching to JSX Harmony).

like image 4
Wheeler Avatar answered Nov 20 '22 06:11

Wheeler