{"action":"created","issue":{"url":"https://api.github.com/repos/zeit/next.js/issues/1239","repository_url":"https://api.github.com/repos/zeit/next.js","labels_url":"https://api.github.com/repos/zeit/next.js/issues/1239/labels{/name}","comments_url":"https://api.github.com/repos/zeit/next.js/issues/1239/comments","events_url":"https://api.github.com/repos/zeit/next.js/issues/1239/events","html_url":"https://github.com/zeit/next.js/issues/1239","id":209308537,"number":1239,"title":"Issues with client rendering and componentDidMount...","user":{"login":"iamjacks","id":20402623,"avatar_url":"https://avatars.githubusercontent.com/u/20402623?v=3","gravatar_id":"","url":"https://api.github.com/users/iamjacks","html_url":"https://github.com/iamjacks","followers_url":"https://api.github.com/users/iamjacks/followers","following_url":"https://api.github.com/users/iamjacks/following{/other_user}","gists_url":"https://api.github.com/users/iamjacks/gists{/gist_id}","starred_url":"https://api.github.com/users/iamjacks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamjacks/subscriptions","organizations_url":"https://api.github.com/users/iamjacks/orgs","repos_url":"https://api.github.com/users/iamjacks/repos","events_url":"https://api.github.com/users/iamjacks/events{/privacy}","received_events_url":"https://api.github.com/users/iamjacks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-21T23:45:26Z","updated_at":"2017-02-22T00:15:46Z","closed_at":null,"body":"I recreated my issue in an example gist that has 2 files...\r\nhttps://gist.github.com/iamjacks/ac55d4bc1229c69015c47b1a88c8ccb9\r\n\r\nThe initial (server side) rendering will result in the correct width output for the inner div. However, when navigating to the other page and returning back to the home page, the width is incorrect. Also, why is my window resize event listener causing setState warnings in that same situation when navigating back to the home page and resizing the window? \r\n\r\nNot sure if this is a bug/issue with Next, React, or if I'm doing something wrong. I ran into this problem when I began building a content slider carousel for a school project. Whenever I'd go back to my home page the slides were bigger than they previously were on the initial render.    \r\n\r\nPardon my ignorance.\r\n\r\nEdit: I realize now the first issue is related to styled-jsx. If I remove the styled-jsx css and place it in a global in `<head>` instead, it gets the correct element width in both server and client rendering. \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/zeit/next.js/issues/comments/281525682","html_url":"https://github.com/zeit/next.js/issues/1239#issuecomment-281525682","issue_url":"https://api.github.com/repos/zeit/next.js/issues/1239","id":281525682,"user":{"login":"sergiodxa","id":1312018,"avatar_url":"https://avatars.githubusercontent.com/u/1312018?v=3","gravatar_id":"","url":"https://api.github.com/users/sergiodxa","html_url":"https://github.com/sergiodxa","followers_url":"https://api.github.com/users/sergiodxa/followers","following_url":"https://api.github.com/users/sergiodxa/following{/other_user}","gists_url":"https://api.github.com/users/sergiodxa/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiodxa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiodxa/subscriptions","organizations_url":"https://api.github.com/users/sergiodxa/orgs","repos_url":"https://api.github.com/users/sergiodxa/repos","events_url":"https://api.github.com/users/sergiodxa/events{/privacy}","received_events_url":"https://api.github.com/users/sergiodxa/received_events","type":"User","site_admin":false},"created_at":"2017-02-22T00:15:46Z","updated_at":"2017-02-22T00:15:46Z","body":"About the warning with `setState` it's because of this line https://gist.github.com/iamjacks/ac55d4bc1229c69015c47b1a88c8ccb9#file-index-js-L23 and this one https://gist.github.com/iamjacks/ac55d4bc1229c69015c47b1a88c8ccb9#file-index-js-L27.\r\n\r\nWhen you bind a function you are creating a new function, to remove an event listener you **must** pass the exactly same function, but you are binding the function two times and you are creating 2 different functions in memory, so it's not removing the listener.\r\n\r\n"}}
{"actor":{"display_login":"sergiodxa"}}