You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which would compile to (just showing some examples not all of them):
// without className and spreads<divclassName={`jsx123`}/>// with existing className<divclassName={`test jsx123`}/>
// with existing className and a spread<div{...props}className={`${props.className!=null&&props.className||'test'} jsx123`}/>// with existing className and many spread<div{...props}{...rest}className={`${props.className!=null&&props.className||rest.className!=null&&rest.className||`test ${test ? 'test' : ''}`} jsx123`}/>
// with a spread only<div{...props}className={`${props.className!=null&&props.className||''} jsx123`}/>// with many spread only<div{...props}{...rest}className={`${props.className!=null&&props.className||rest.className!=null&&rest.className||''} jsx123`}/>
where jsx123 is the style-jsx unique classname.
The text was updated successfully, but these errors were encountered:
To improve performances we should switch to use
className
instead of thedata-jsx
attribute.When we have spread props eg.
{...props}
we would need to move theclassName
attribute to the end and rewrite it so it applies classes on cascade.I actually started to work on it (didn't go far though so contribution are still welcome!) and here is the test case:
Which would compile to (just showing some examples not all of them):
where
jsx123
is the style-jsx unique classname.The text was updated successfully, but these errors were encountered: