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
{{ message }}
Repository navigation
html-jsx fix case-insensitive attributes and style names #838
In React, we currently warn in __DEV__ for unknown properties when we think there's something you meant to use. In your case maxlength should have warned that it was expecting maxLength (https://github.com/facebook/react/blob/master/src/dom/DOMPropertyOperations.js#L58-L64). We don't warn for the others because it has potential to become very noisy (and would be unacceptably so at FB).
Otherwise, I agree that we should make some improvements to the HTML-JSX converter for accuracy. The tool is meant to still be in beta :)
Thanks, I can work on this. It might be worth utilising DefaultDOMPropertyConfig.js in html-jsx-lib so that its checks are consistent with React itself. I'm actually surprised how well the HTML to JSX converter is working at the moment, it seems like the only issues are little ones that should have easy fixes.
Activity
zpao commentedon Jan 8, 2014
In React, we currently warn in
__DEV__for unknown properties when we think there's something you meant to use. In your casemaxlengthshould have warned that it was expectingmaxLength(https://github.com/facebook/react/blob/master/src/dom/DOMPropertyOperations.js#L58-L64). We don't warn for the others because it has potential to become very noisy (and would be unacceptably so at FB).Otherwise, I agree that we should make some improvements to the HTML-JSX converter for accuracy. The tool is meant to still be in beta :)
cc @Daniel15
Daniel15 commentedon Jan 8, 2014
Thanks, I can work on this. It might be worth utilising DefaultDOMPropertyConfig.js in html-jsx-lib so that its checks are consistent with React itself. I'm actually surprised how well the HTML to JSX converter is working at the moment, it seems like the only issues are little ones that should have easy fixes.
-t-e-x-t-a-l-i-g-nis pretty amusing. :PDaniel15 commentedon Sep 21, 2014
Moving HTMLToJSX issues to the https://github.com/reactjs/react-magic repository.