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

htmlFor versus for? #132

Closed
jasonday opened this Issue Dec 21, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@jasonday
Copy link

jasonday commented Dec 21, 2016

Isn't htmlfor is only recognized by IE8 if it's in Compatibility Mode. In Standards Mode, it ignores the htmlfor attribute. In both modes, for works properly. Shouldn't htmlFor be for, or what am I missing?

@lencioni

This comment has been minimized.

Copy link
Collaborator

lencioni commented Dec 21, 2016

https://facebook.github.io/react/docs/dom-elements.html#htmlfor

Since for is a reserved word in JavaScript, React elements use htmlFor instead.

If you use htmlFor on your React element, for will end up in the DOM.

@lencioni lencioni closed this Dec 21, 2016

@lencioni lencioni added the question label Dec 21, 2016

@jasonday

This comment has been minimized.

Copy link
Author

jasonday commented Dec 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment