{"action":"created","issue":{"url":"https://api.github.com/repos/callemall/material-ui/issues/8119","repository_url":"https://api.github.com/repos/callemall/material-ui","labels_url":"https://api.github.com/repos/callemall/material-ui/issues/8119/labels{/name}","comments_url":"https://api.github.com/repos/callemall/material-ui/issues/8119/comments","events_url":"https://api.github.com/repos/callemall/material-ui/issues/8119/events","html_url":"https://github.com/callemall/material-ui/pull/8119","id":256462873,"number":8119,"title":"[core] Try out preact","user":{"login":"oliviertassinari","id":3165635,"avatar_url":"https://avatars2.githubusercontent.com/u/3165635?v=4","gravatar_id":"","url":"https://api.github.com/users/oliviertassinari","html_url":"https://github.com/oliviertassinari","followers_url":"https://api.github.com/users/oliviertassinari/followers","following_url":"https://api.github.com/users/oliviertassinari/following{/other_user}","gists_url":"https://api.github.com/users/oliviertassinari/gists{/gist_id}","starred_url":"https://api.github.com/users/oliviertassinari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliviertassinari/subscriptions","organizations_url":"https://api.github.com/users/oliviertassinari/orgs","repos_url":"https://api.github.com/users/oliviertassinari/repos","events_url":"https://api.github.com/users/oliviertassinari/events{/privacy}","received_events_url":"https://api.github.com/users/oliviertassinari/received_events","type":"User","site_admin":false},"labels":[{"id":297148466,"url":"https://api.github.com/repos/callemall/material-ui/labels/core","name":"core","color":"006b75","default":false},{"id":334830271,"url":"https://api.github.com/repos/callemall/material-ui/labels/PR:%20on%20hold","name":"PR: on hold","color":"bfdadc","default":false},{"id":416834291,"url":"https://api.github.com/repos/callemall/material-ui/labels/v1","name":"v1","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-09T20:10:26Z","updated_at":"2017-09-18T10:54:54Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/callemall/material-ui/pulls/8119","html_url":"https://github.com/callemall/material-ui/pull/8119","diff_url":"https://github.com/callemall/material-ui/pull/8119.diff","patch_url":"https://github.com/callemall/material-ui/pull/8119.patch"},"body":"I wanted to give a shot at preact. See what was missing in order to use it for the production build of the documentation. Unfortunately, it's not ready. Here are the issues I could spot.\r\n\r\n@developit I hope that can help.\r\n\r\n---\r\n\r\n## Development related issues\r\n\r\n- Next.js use [babel-plugin-transform-react-jsx-source](https://github.com/babel/babel/tree/0189b387026c35472dccf45d14d58312d249f799/packages/babel-plugin-transform-react-jsx-source) to help with the debug. However, preact leaks the extra `__source` properties down the react tree to his children. I have seen many warnings in the console. On the other hand, React handles it with a [`RESERVED_PROPS`](https://github.com/facebook/react/blob/357925a84e34d17b96568e67d30baeb2a399da11/src/isomorphic/classic/element/ReactElement.js#L31) object.\r\n- Navigation between pages fails with [an error coming from react-deep-force-update](https://github.com/gaearon/react-deep-force-update/blob/b8ad7e6811c1b604c1f04be3e3ac196d1d3a0c56/src/index.js#L53):\r\n> TypeError: Cannot read property 'tag' of undefined\r\n    at deepForceUpdate (http://0.0.0.0:3000/_next/1504987979136/main.js:18699:18)\r\n- For some reason, the ripples exit too quickly.\r\n\r\n---\r\n\r\n## Noticed in prod & dev\r\n\r\n- The `key` properties are leaking between parent and children component, the same way `__source` does.\r\n- The `ref` callback properties aren't called, leading to many bugs. For instance, the focus ripple doesn't display on a button or the Modal fails to open with an error as we don't have the dom node reference.\r\n- Using `<script />` into a render method makes the linked script to be executed twice, while it's executed once with React (I have been adding breaking points inside)\r\n\r\n```jsx\r\n      <div className={classes.ad}>\r\n        <script\r\n          async\r\n          src=\"//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=materialuicom\"\r\n          id=\"_carbonads_js\"\r\n        />\r\n      </div>\r\n```"},"comment":{"url":"https://api.github.com/repos/callemall/material-ui/issues/comments/330186278","html_url":"https://github.com/callemall/material-ui/pull/8119#issuecomment-330186278","issue_url":"https://api.github.com/repos/callemall/material-ui/issues/8119","id":330186278,"user":{"login":"SukantGujar","id":6153264,"avatar_url":"https://avatars2.githubusercontent.com/u/6153264?v=4","gravatar_id":"","url":"https://api.github.com/users/SukantGujar","html_url":"https://github.com/SukantGujar","followers_url":"https://api.github.com/users/SukantGujar/followers","following_url":"https://api.github.com/users/SukantGujar/following{/other_user}","gists_url":"https://api.github.com/users/SukantGujar/gists{/gist_id}","starred_url":"https://api.github.com/users/SukantGujar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SukantGujar/subscriptions","organizations_url":"https://api.github.com/users/SukantGujar/orgs","repos_url":"https://api.github.com/users/SukantGujar/repos","events_url":"https://api.github.com/users/SukantGujar/events{/privacy}","received_events_url":"https://api.github.com/users/SukantGujar/received_events","type":"User","site_admin":false},"created_at":"2017-09-18T10:54:54Z","updated_at":"2017-09-18T10:54:54Z","author_association":"NONE","body":"You are right, on mobile devices this will make a difference. The gzip size is not the actual motivation, its more about the [parsing time](https://medium.com/reloading/javascript-start-up-performance-69200f43b201) spent on the un-zipped scripts. React is roughly 8x the size of Preact and it has an impact on mobile."}}
{"actor":{"display_login":"SukantGujar"}}