{"action":"opened","issue":{"url":"https://api.github.com/repos/captivationsoftware/react-sticky/issues/244","repository_url":"https://api.github.com/repos/captivationsoftware/react-sticky","labels_url":"https://api.github.com/repos/captivationsoftware/react-sticky/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/captivationsoftware/react-sticky/issues/244/comments","events_url":"https://api.github.com/repos/captivationsoftware/react-sticky/issues/244/events","html_url":"https://github.com/captivationsoftware/react-sticky/issues/244","id":335195725,"node_id":"MDU6SXNzdWUzMzUxOTU3MjU=","number":244,"title":"Sticky behaves differently with this code","user":{"login":"c0debreaker","id":3783931,"node_id":"MDQ6VXNlcjM3ODM5MzE=","avatar_url":"https://avatars1.githubusercontent.com/u/3783931?v=4","gravatar_id":"","url":"https://api.github.com/users/c0debreaker","html_url":"https://github.com/c0debreaker","followers_url":"https://api.github.com/users/c0debreaker/followers","following_url":"https://api.github.com/users/c0debreaker/following{/other_user}","gists_url":"https://api.github.com/users/c0debreaker/gists{/gist_id}","starred_url":"https://api.github.com/users/c0debreaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c0debreaker/subscriptions","organizations_url":"https://api.github.com/users/c0debreaker/orgs","repos_url":"https://api.github.com/users/c0debreaker/repos","events_url":"https://api.github.com/users/c0debreaker/events{/privacy}","received_events_url":"https://api.github.com/users/c0debreaker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-24T17:11:56Z","updated_at":"2018-06-24T17:11:56Z","closed_at":null,"author_association":"NONE","body":"This is the basic example I copied. I was playing with the code to figure out how it works. However, I hardcoded the background style in the Header and the sticky didn't behave as expected anymore. Why is it doing that?\r\n\r\n```js\r\nimport React, { PureComponent } from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\n\r\nimport { Sticky, StickyContainer } from \"../../src\";\r\nimport { Header } from \"../header\";\r\n\r\nlet renderCount = 0;\r\nexport class Basic extends PureComponent {\r\n  render() {\r\n    return (\r\n      <div>\r\n        <h2>Content before the Sticky...</h2>\r\n        <div\r\n          className=\"gap short\"\r\n          style={{ background: \"linear-gradient(#fff, #ddd)\" }}\r\n        />\r\n        <StickyContainer className=\"container\">\r\n          <Sticky>\r\n            {({ style }) => (\r\n              <Header style={{ background: \"linear-gradient(#fff, #ddd)\"}} renderCount={renderCount++} />\r\n            )}\r\n          </Sticky>\r\n\r\n          <h2 className=\"text-center\">{\"<StickyContainer />\"}</h2>\r\n        </StickyContainer>\r\n        <div\r\n          className=\"gap tall\"\r\n          style={{ background: \"linear-gradient(#ddd, #fff)\" }}\r\n        >\r\n          <h2>Content after the Sticky...</h2>\r\n        </div>\r\n      </div>\r\n    );\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"c0debreaker"}}