payload: {"action":"created","issue":{"url":"https://api.github.com/repos/FrimJo/react-hooks/issues/2","repository_url":"https://api.github.com/repos/FrimJo/react-hooks","labels_url":"https://api.github.com/repos/FrimJo/react-hooks/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/FrimJo/react-hooks/issues/2/comments","events_url":"https://api.github.com/repos/FrimJo/react-hooks/issues/2/events","html_url":"https://github.com/FrimJo/react-hooks/issues/2","id":463388937,"node_id":"MDU6SXNzdWU0NjMzODg5Mzc=","number":2,"title":"State is not maintained when hot reloading","user":{"login":"Dundercover","id":1681435,"node_id":"MDQ6VXNlcjE2ODE0MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1681435?v=4","gravatar_id":"","url":"https://api.github.com/users/Dundercover","html_url":"https://github.com/Dundercover","followers_url":"https://api.github.com/users/Dundercover/followers","following_url":"https://api.github.com/users/Dundercover/following{/other_user}","gists_url":"https://api.github.com/users/Dundercover/gists{/gist_id}","starred_url":"https://api.github.com/users/Dundercover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dundercover/subscriptions","organizations_url":"https://api.github.com/users/Dundercover/orgs","repos_url":"https://api.github.com/users/Dundercover/repos","events_url":"https://api.github.com/users/Dundercover/events{/privacy}","received_events_url":"https://api.github.com/users/Dundercover/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-07-02T19:05:48Z","updated_at":"2019-07-05T08:02:21Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"If you change anything, the app will do a hard reload and reset to initial state. This is a bit problematic if you are just changing some styles for some component and have to get back to where you were after every change to witness the result. Can we solve this somehow? Could it be typescript that is recompiling everything? Do we need to set `transpileOnly: true`? "},"comment":{"url":"https://api.github.com/repos/FrimJo/react-hooks/issues/comments/508669991","html_url":"https://github.com/FrimJo/react-hooks/issues/2#issuecomment-508669991","issue_url":"https://api.github.com/repos/FrimJo/react-hooks/issues/2","id":508669991,"node_id":"MDEyOklzc3VlQ29tbWVudDUwODY2OTk5MQ==","user":{"login":"FrimJo","id":4533443,"node_id":"MDQ6VXNlcjQ1MzM0NDM=","avatar_url":"https://avatars2.githubusercontent.com/u/4533443?v=4","gravatar_id":"","url":"https://api.github.com/users/FrimJo","html_url":"https://github.com/FrimJo","followers_url":"https://api.github.com/users/FrimJo/followers","following_url":"https://api.github.com/users/FrimJo/following{/other_user}","gists_url":"https://api.github.com/users/FrimJo/gists{/gist_id}","starred_url":"https://api.github.com/users/FrimJo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrimJo/subscriptions","organizations_url":"https://api.github.com/users/FrimJo/orgs","repos_url":"https://api.github.com/users/FrimJo/repos","events_url":"https://api.github.com/users/FrimJo/events{/privacy}","received_events_url":"https://api.github.com/users/FrimJo/received_events","type":"User","site_admin":false},"created_at":"2019-07-05T08:02:21Z","updated_at":"2019-07-05T08:02:21Z","author_association":"OWNER","body":"@Dundercover I have pushed a new version to master, containing changes to almost fix hot-reloading issue.\r\n\r\nI added a temporary component in `App.tsx` to test hot reloading. One of the problems were that `tslint --fix` automatically added function calls (which where using `dispatch` or `useCallback` under the hood) to varying dependencies arrays for hooks further up the tree. This resulted in unnecessary re-renders. A dirty solution was to add `// eslint-disable-next-line react-hooks/exhaustive-deps` to all these places, though I believe there is a more \"correct\" way of fixing this issue, all feedback are welcome.\r\n\r\nStill though, the fetch component re-renders when hot-reloading, couldn't figure that on out. Will probably have a new look at it tomorrow."}}
other: {"actor":{"display_login":"FrimJo"}}