{"action":"created","issue":{"url":"https://api.github.com/repos/akiran/react-slick/issues/1130","repository_url":"https://api.github.com/repos/akiran/react-slick","labels_url":"https://api.github.com/repos/akiran/react-slick/issues/1130/labels{/name}","comments_url":"https://api.github.com/repos/akiran/react-slick/issues/1130/comments","events_url":"https://api.github.com/repos/akiran/react-slick/issues/1130/events","html_url":"https://github.com/akiran/react-slick/issues/1130","id":307675212,"number":1130,"title":"Custom Next and Prev Props logs warnings to the console.","user":{"login":"Pushplaybang","id":1330359,"avatar_url":"https://avatars2.githubusercontent.com/u/1330359?v=4","gravatar_id":"","url":"https://api.github.com/users/Pushplaybang","html_url":"https://github.com/Pushplaybang","followers_url":"https://api.github.com/users/Pushplaybang/followers","following_url":"https://api.github.com/users/Pushplaybang/following{/other_user}","gists_url":"https://api.github.com/users/Pushplaybang/gists{/gist_id}","starred_url":"https://api.github.com/users/Pushplaybang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pushplaybang/subscriptions","organizations_url":"https://api.github.com/users/Pushplaybang/orgs","repos_url":"https://api.github.com/users/Pushplaybang/repos","events_url":"https://api.github.com/users/Pushplaybang/events{/privacy}","received_events_url":"https://api.github.com/users/Pushplaybang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-22T14:47:06Z","updated_at":"2018-03-23T05:37:06Z","closed_at":null,"author_association":"NONE","body":"The following two errors occur when using custom elements for the next and prev arrows.\r\n\r\n```\r\nWarning: React does not recognize the `currentSlide` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `currentslide` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\r\n```\r\n\r\n```\r\nwarning.js:33 Warning: React does not recognize the `slideCount` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `slidecount` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\r\n```\r\n\r\nI've defined them as stateless functions as follows:\r\n\r\n```js\r\nexport const PrevArrow = props => (\r\n  <button type=\"button\" {...props}>\r\n    <PrevIcon />\r\n  </button>\r\n);\r\n\r\nexport const NextArrow = props => (\r\n  <button type=\"button\" {...props}>\r\n    <NextIcon />\r\n  </button>\r\n);\r\n```"},"comment":{"url":"https://api.github.com/repos/akiran/react-slick/issues/comments/375550551","html_url":"https://github.com/akiran/react-slick/issues/1130#issuecomment-375550551","issue_url":"https://api.github.com/repos/akiran/react-slick/issues/1130","id":375550551,"user":{"login":"laveesingh","id":8917978,"avatar_url":"https://avatars0.githubusercontent.com/u/8917978?v=4","gravatar_id":"","url":"https://api.github.com/users/laveesingh","html_url":"https://github.com/laveesingh","followers_url":"https://api.github.com/users/laveesingh/followers","following_url":"https://api.github.com/users/laveesingh/following{/other_user}","gists_url":"https://api.github.com/users/laveesingh/gists{/gist_id}","starred_url":"https://api.github.com/users/laveesingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laveesingh/subscriptions","organizations_url":"https://api.github.com/users/laveesingh/orgs","repos_url":"https://api.github.com/users/laveesingh/repos","events_url":"https://api.github.com/users/laveesingh/events{/privacy}","received_events_url":"https://api.github.com/users/laveesingh/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T05:37:06Z","updated_at":"2018-03-23T05:37:06Z","author_association":"COLLABORATOR","body":"First of all, these are warnings, not errors.\r\nThe props that are passed to arrow components, contain slideCount and currentSlide custom props. So, if you're gonna define your arrows like this, you might wanna extract those props out first. Something like this should do:\r\n```javascript\r\nconst {currentSlide, slideCount, ...arrowProps} = props\r\n<button {...otherProps}>\r\n```"}}
{"actor":{"display_login":"laveesingh"}}