React-slick: Version 0.14.8: Unknown props `currentSlide`, `slideCount` on <div> tag Warning Back

Created on 21 Apr 2017  路  7Comments  路  Source: akiran/react-slick

@akiran Seems like this commit #624 was removed from version 0.14.8 and needs to be remerged.

Most helpful comment

I just hit this.

For anyone else slightly confused:
If you implement your own prev/next arrows react-slick will pass currentSlide and slideCount props to your custom components. It's on you not to place these properties on tags that shouldn't have them. The following is how I dealt with this.

export const CustomArrow = props => {
  // pull off props that don't belong on a <button> tag
  const { currentSlide, slideCount, ...remainingProps } = props

  return (
    <button {...remainingProps}>
      My Btn
    </button>
  )
}

All 7 comments

@akiran Updated to 0.14.11. Seems like #624 has not been remerged and still experiencing this error.

i am experiencing the same issue for 0.14.11.

I am experiencing this error on 0.14.11 as well.

@akiran I am experiencing this error as well, please remerge.

It's not an error. It's just a warning. I'm sending a PR to fix this, hope it's accepted ASAP.

I just hit this.

For anyone else slightly confused:
If you implement your own prev/next arrows react-slick will pass currentSlide and slideCount props to your custom components. It's on you not to place these properties on tags that shouldn't have them. The following is how I dealt with this.

export const CustomArrow = props => {
  // pull off props that don't belong on a <button> tag
  const { currentSlide, slideCount, ...remainingProps } = props

  return (
    <button {...remainingProps}>
      My Btn
    </button>
  )
}

You have to follow solution mentioned by @kjs3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eternalsky picture eternalsky  路  3Comments

ramyatrouny picture ramyatrouny  路  3Comments

jfamousket picture jfamousket  路  3Comments

laveesingh picture laveesingh  路  3Comments

rohitgoyal7 picture rohitgoyal7  路  3Comments