Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why handle className? #123

Closed
jorgebucaran opened this issue Mar 2, 2017 · 4 comments
Closed

Why handle className? #123

jorgebucaran opened this issue Mar 2, 2017 · 4 comments

Comments

@jorgebucaran
Copy link
Owner

This works:

const node = <div class="foo">ok</div>

This also works:

const node = html`<div class="foo">ok</div>`

Maybe I forgot, but I don't see what's the point of supporting className in HyperApp.

@jorgebucaran
Copy link
Owner Author

This seems to be related:

Unfortunately, this seems to be an issue with how Hyperx creates both classname and class attributes in elements, so we need to support className, otherwise HyperApp would fail to toggle a class name when using Hyperx.

@tunnckoCore
Copy link

it is not related to anything. just kinda convention because such are keywords in js. that is the case with "for" -> "htmlFor", and http-equiv to httpEquiv

@jorgebucaran
Copy link
Owner Author

jorgebucaran commented Mar 2, 2017

Sure, I think I know that pretty well. The issue here is that Hyperx adds a classname property to elements and there is no way to turn it off which forces us to handle it specifically.

@ngryman
Copy link
Contributor

ngryman commented Mar 10, 2017

Related: #85.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants