Jarzka/stylefy

Getting Invalid DOM property `class`. Did you mean `className`?

pragyanatvade opened this issue · 5 comments

I am getting

Invalid DOM property `class`. Did you mean `className`?

Warning while using stylefy. Is there a way I can rename this or fix this in my application?

This error does not come from stylefy, but it's a React feature. React does not accept class property name, but wants className instead (which it converts back to class in the end). Reagent, however, does not have such limitation.

Are you sure you are using Reagent in your project? If Reagent is set up correctly, you should be able to create HTML elements with class property with or without using stylefy.

I am trying to use fulcro with stylefy. I am trying to figure out is there any workaround for this issue?

I'm not familiar with fulcro, but if I'm right it uses React directly instead of Reagent. stylefy requires Reagent because the asynchronous style generation depends on Reagent atoms. Thus, currently there is no workaround for this.

There has been some discussion in the past of making stylefy Reagent free. Technically this is possible, but not without sacrifing some rendering speed.

OK. I will try out something else. Thanks a lot for the help. :)

This Problem was to me, I did use Bootstrap, and I forgot to put 'className' After I changed className My Problem was Solved.