-
Notifications
You must be signed in to change notification settings - Fork 35
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
inconsistent automatic snake case to camel case conversion #108
Comments
This is worse than I thought. Take The specific list is as follows: acceptCharset accessKey allowFullScreen allowTransparency autoComplete
autoPlay cellPadding cellSpacing charSet classID className colSpan
contentEditable contextMenu crossOrigin dateTime encType formAction
formEncType formMethod formNoValidate formTarget frameBorder hrefLang htmlFor
httpEquiv marginHeight marginWidth maxLength mediaGroup noValidate radioGroup
readOnly rowSpan spellCheck srcDoc srcSet tabIndex useMap dangerouslySetInnerHTML Solutions: (in cases we are only referring to names in the above list)
3 and 1 are similar but 3 seems much better (i.e. you are only disallowing a the above camelCased names as sort of "reserved words." A variation on (3) would be to only disallow both the snake and camel versions to be declared in the same component. I.e. its fine to have allowFullScreen as long as you don't also have allow_full_screen. A positive to #1 is that it has the least magic. The above list AND their snake_case counter parts all become effectively reserved. 4- is untenable 2- is probably doable, but has a lot of magic. 5- seems like too much magic, and also very hard to deprecate, as people may have code looking directly at props... |
This issue was moved to ruby-hyperloop/hyper-react#108 |
We need to clean this up for example the html attribute
default-value
should be expressible as:default_value
or"default-value"
. Sometimes things are getting converted, sometimes not.Also conversions should only apply when passing params to builtin in tags, and (possibly) to native .js components. i.e. when passing a param to a ruby component no conversion should be made.
Related to #99
The text was updated successfully, but these errors were encountered: