add "data-" prefix for custom attributes
I'm not sure this is a good idea... I don't think a user will expect <div foo="bar"> to be transformed to <div data-foo="bar">. If you want to do that, the source should be<div data-foo="bar"> already. I don't like the idea of magically renaming things :smile:
I agree no renaming should happen, but these are problematic for React. Attributes are whitelisted for known HTML elements. React is fine with custom elements, elements containing at least one dash in their name, having random attributes but non-whitelisted attributes are treated as props.
@Daniel15 when using custom attributes in react, these attributes will be removed after rendering, to solve this problem, react supports all data-* and aria-* attributes
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!
If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact [email protected] if you have any questions.