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

react 0.14.6 renderToStaticMarkup for CustomComponent #5883

Closed
barak007 opened this issue Jan 19, 2016 · 1 comment
Closed

react 0.14.6 renderToStaticMarkup for CustomComponent #5883

barak007 opened this issue Jan 19, 2016 · 1 comment

Comments

@barak007
Copy link

Hi,
Why does renderToStaticMarkup outputs "className" in the markup for "CustomComponent" (hyphenated tag-names)?

React.renderToStaticMarkup(React.createElement('my-div', {className: 'bobi'}));

//outputs
<my-div className="bobi"></my-div>

//expected 
<my-div class="bobi"></my-div>
@jimfb
Copy link
Contributor

jimfb commented Jan 19, 2016

Use the class prop instead of className for custom elements.

Custom elements are allowed to do arbitrary processing of their props, so in order to support the full range of attributes, the only viable option is to pass them directly through. #4933

@jimfb jimfb closed this as completed Jan 19, 2016
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

2 participants