{"action":"created","issue":{"url":"https://api.github.com/repos/wix/react-templates/issues/9","labels_url":"https://api.github.com/repos/wix/react-templates/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/wix/react-templates/issues/9/comments","events_url":"https://api.github.com/repos/wix/react-templates/issues/9/events","html_url":"https://github.com/wix/react-templates/issues/9","id":54722686,"number":9,"title":"Feature Request: Support hyphenated tag names","user":{"login":"cmaher","id":1278501,"avatar_url":"https://avatars.githubusercontent.com/u/1278501?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaher","html_url":"https://github.com/cmaher","followers_url":"https://api.github.com/users/cmaher/followers","following_url":"https://api.github.com/users/cmaher/following{/other_user}","gists_url":"https://api.github.com/users/cmaher/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaher/subscriptions","organizations_url":"https://api.github.com/users/cmaher/orgs","repos_url":"https://api.github.com/users/cmaher/repos","events_url":"https://api.github.com/users/cmaher/events{/privacy}","received_events_url":"https://api.github.com/users/cmaher/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-19T03:20:24Z","updated_at":"2015-01-19T14:47:00Z","closed_at":"2015-01-19T13:34:33Z","body":"The custom-elements spec requires that custom elements contain a hyphen in the name. React natively supports this with `React.createElement(\"my-custom-element\", null)`.  Currently, react-templates compiles `<my-custom-element>` as `React.createElement(my - custom - element, {})`, which is undesirable.\r\n\r\nAdditionally, it would be nice to support hyphenated identifiers for components imported via `rt-require`:  `<rt-require dependency='users/form' as='users-form'/>`.\r\n\r\nThis could be handled in the templating phase (pre esprima.parse), and two separate cases would need to be handled:\r\n\r\n1. For hyphens in rt-require components: convert dash-case names to camelCase.\r\n2. For custom elements, enclose the identifier in quotes.\r\n\r\nI'd be willing to work on this, but I figure I'd check to see if there were interest in the idea before starting development."},"comment":{"url":"https://api.github.com/repos/wix/react-templates/issues/comments/70503852","html_url":"https://github.com/wix/react-templates/issues/9#issuecomment-70503852","issue_url":"https://api.github.com/repos/wix/react-templates/issues/9","id":70503852,"user":{"login":"cmaher","id":1278501,"avatar_url":"https://avatars.githubusercontent.com/u/1278501?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaher","html_url":"https://github.com/cmaher","followers_url":"https://api.github.com/users/cmaher/followers","following_url":"https://api.github.com/users/cmaher/following{/other_user}","gists_url":"https://api.github.com/users/cmaher/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaher/subscriptions","organizations_url":"https://api.github.com/users/cmaher/orgs","repos_url":"https://api.github.com/users/cmaher/repos","events_url":"https://api.github.com/users/cmaher/events{/privacy}","received_events_url":"https://api.github.com/users/cmaher/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T14:47:00Z","updated_at":"2015-01-19T14:47:00Z","body":"I don't think the variable naming scheme will be confusing. Angular already does this with their directives (matching `users-form` to `usersForm`), and only advanced users will have use of the generated code anyway.\r\n\r\nso, for example\r\n\r\n```\r\n<rt-require dependency='users/form' as='users-form'/>\r\n<users-form/>\r\n\r\n//Generated code\r\nvar usersForm = require('users/form');\r\n...\r\nReact.createElement(usersForm, {})\r\n```\r\nAs long as a consistent, documented approach is taken, users should be fine with it."}}