{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/12614","repository_url":"https://api.github.com/repos/facebook/react","labels_url":"https://api.github.com/repos/facebook/react/issues/12614/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/12614/comments","events_url":"https://api.github.com/repos/facebook/react/issues/12614/events","html_url":"https://github.com/facebook/react/issues/12614","id":314346540,"number":12614,"title":"Invalid value for data- prop.  Expected behavior?","user":{"login":"a-laughlin","id":1176527,"avatar_url":"https://avatars3.githubusercontent.com/u/1176527?v=4","gravatar_id":"","url":"https://api.github.com/users/a-laughlin","html_url":"https://github.com/a-laughlin","followers_url":"https://api.github.com/users/a-laughlin/followers","following_url":"https://api.github.com/users/a-laughlin/following{/other_user}","gists_url":"https://api.github.com/users/a-laughlin/gists{/gist_id}","starred_url":"https://api.github.com/users/a-laughlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-laughlin/subscriptions","organizations_url":"https://api.github.com/users/a-laughlin/orgs","repos_url":"https://api.github.com/users/a-laughlin/repos","events_url":"https://api.github.com/users/a-laughlin/events{/privacy}","received_events_url":"https://api.github.com/users/a-laughlin/received_events","type":"User","site_admin":false},"labels":[{"id":620368407,"url":"https://api.github.com/repos/facebook/react/labels/Resolution:%20Needs%20More%20Information","name":"Resolution: Needs More Information","color":"fffde7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-14T17:26:46Z","updated_at":"2018-04-18T00:52:07Z","closed_at":null,"author_association":"NONE","body":"Per [this blog post](https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html#data-and-aria-attributes), react allows passing data attributes freely.  In React 16.2.0, on MacOS 10.13 Chrome 65, freely seems to stop short of functions.\r\n\r\nReplication steps:\r\n```js\r\nReactDOM.render(\r\n  React.createElement('h1',{['data-foo']:x=>x}),\r\n  document.getElementById('root')\r\n);\r\n```\r\n![image](https://user-images.githubusercontent.com/1176527/38770227-bdae1588-3fcc-11e8-903e-d37bc3e3b69e.png)\r\n\r\nIf the behavior is expected (or not), links/recommendations on how to silence or disable it are welcome. As console errors with stack traces printed, three of those messages scroll a whole page of the console on every reload.  I'd love to find a way around it that doesn't involve hacking the app code or React just to disable a warning.  Following [this closed thread about console warn vs error](https://github.com/facebook/react/issues/6414) led to a currently open thread for [warning output hooks](https://github.com/facebook/react/issues/4302).  I'm currently trying negative lookaround regex filters in chrome dev tools, and those are locking up the dev console process.  \r\n\r\nedit: A dev tools filter of `-Invalid` solved the issue well enough for me.  Leaving this post in case it is a bug."},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/382206936","html_url":"https://github.com/facebook/react/issues/12614#issuecomment-382206936","issue_url":"https://api.github.com/repos/facebook/react/issues/12614","id":382206936,"user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars0.githubusercontent.com/u/810438?v=4","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"created_at":"2018-04-18T00:52:07Z","updated_at":"2018-04-18T00:52:07Z","author_association":"MEMBER","body":"My first thought is I don’t see us changing useful warnings (potentially could mean you forgot to *call* a method and pass a function by mistake) to accommodate this use case. It seems to me like you’re essentially reimplementing React components but in a much more roundabout way, and that creates difficulties. "}}
{"actor":{"display_login":"gaearon"}}