{"action":"created","issue":{"url":"https://api.github.com/repos/trueadm/inferno/issues/132","repository_url":"https://api.github.com/repos/trueadm/inferno","labels_url":"https://api.github.com/repos/trueadm/inferno/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/trueadm/inferno/issues/132/comments","events_url":"https://api.github.com/repos/trueadm/inferno/issues/132/events","html_url":"https://github.com/trueadm/inferno/issues/132","id":140886138,"number":132,"title":"Props with hyphens incorrectly transpiled during JSX transformation","user":{"login":"mseeley","id":30019,"avatar_url":"https://avatars.githubusercontent.com/u/30019?v=3","gravatar_id":"","url":"https://api.github.com/users/mseeley","html_url":"https://github.com/mseeley","followers_url":"https://api.github.com/users/mseeley/followers","following_url":"https://api.github.com/users/mseeley/following{/other_user}","gists_url":"https://api.github.com/users/mseeley/gists{/gist_id}","starred_url":"https://api.github.com/users/mseeley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mseeley/subscriptions","organizations_url":"https://api.github.com/users/mseeley/orgs","repos_url":"https://api.github.com/users/mseeley/repos","events_url":"https://api.github.com/users/mseeley/events{/privacy}","received_events_url":"https://api.github.com/users/mseeley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-15T06:29:41Z","updated_at":"2016-03-15T09:20:00Z","closed_at":null,"body":"This is from Inferno `0.5.22` from NPM. My environment setup is explained in #131.\r\n\r\nThis simple component writes an HTML data attribute:\r\n\r\n```\r\nimport Inferno from 'inferno'; // eslint-disable-line\r\nimport InfernoDOM from 'inferno-dom';\r\nimport { Component } from 'inferno-component';\r\n\r\nclass Item extends Component {\r\n  render() {\r\n    return <div data-attribute={this.props.attribute}>Hello world</div>;\r\n  }\r\n}\r\n\r\nInfernoDOM.render(\r\n  <Item attribute=\"foobar\" />,\r\n  document.body\r\n);\r\n```\r\n\r\nCauses a parse error, see the unquoted `data-id:` `attr` value:\r\n\r\n```\r\nERROR in ./src/index.js\r\nModule parse failed: /Volumes/Files/Personal/Development/sandbox/lists-inferno/node_modules/babel-loader/index.js!/Volumes/Files/Personal/Development/sandbox/lists-inferno/src/index.js Line 216: Unexpected token -\r\nYou may need an appropriate loader to handle this file type.\r\n|     tag: 'div',\r\n|     attrs: {\r\n|       data-attribute: v0\r\n|     },\r\n|     children: 'Hello world'\r\n```\r\n\r\nStashing props in a data attribute is an anti-pattern for certain. Although it would be kind to handle it more gracefully. Exposing data attributes is useful for integration with third-party libs or legacy code requiring DOM state.\r\n\r\nThis popped up during testing trying to mimic a `data-reactid` attribute to track reconciliation.\r\n\r\nThanks a lot!"},"comment":{"url":"https://api.github.com/repos/trueadm/inferno/issues/comments/196736285","html_url":"https://github.com/trueadm/inferno/issues/132#issuecomment-196736285","issue_url":"https://api.github.com/repos/trueadm/inferno/issues/132","id":196736285,"user":{"login":"trueadm","id":1519870,"avatar_url":"https://avatars.githubusercontent.com/u/1519870?v=3","gravatar_id":"","url":"https://api.github.com/users/trueadm","html_url":"https://github.com/trueadm","followers_url":"https://api.github.com/users/trueadm/followers","following_url":"https://api.github.com/users/trueadm/following{/other_user}","gists_url":"https://api.github.com/users/trueadm/gists{/gist_id}","starred_url":"https://api.github.com/users/trueadm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trueadm/subscriptions","organizations_url":"https://api.github.com/users/trueadm/orgs","repos_url":"https://api.github.com/users/trueadm/repos","events_url":"https://api.github.com/users/trueadm/events{/privacy}","received_events_url":"https://api.github.com/users/trueadm/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T09:20:00Z","updated_at":"2016-03-15T09:20:00Z","body":"Hey @mseeley, hyphened JSX attributes are a very common request. I'll look at adding it to the `spike` branch, which will require the `spike` branch of Inferno (it's a large rewrite of the code base). I'll get back to you once this functionality is in! "}}