gajus / babel-plugin-react-css-modules

Transforms styleName to className using compile time CSS module resolution.
Other
2.05k stars 162 forks source link

styleName compiled to stylename (lowercase) #290

Closed chenhu297 closed 3 years ago

chenhu297 commented 3 years ago

I follow this tutorial, but my react component did not compile styleName correct. 'styleName' was changed to 'stylename'.

React throw the error below: Warning: React does not recognize thestyleNameprop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercasestylenameinstead. If you accidentally passed it from a parent component, remove it from the DOM element.