question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning: React does not recognize the `slideCount` prop on a DOM element.

See original GitHub issue

Because of this line https://github.com/akiran/react-slick/blob/master/src/arrows.js#L35 I get errors with React 16.

image

What is the purpose of this? How it will help with a config like this:

    nextArrow: (
        <span>
            <IconButton>
                <FA icon={faChevronRight} />
            </IconButton>
        </span>
    ),

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

50reactions
kirill-konshincommented, May 19, 2018

You may use this as workaround:

const SlickButtonFix = ({currentSlide, slideCount, children, ...props}) => (
    <span {...props}>{children}</span>
);

const SETTINGS = {
    prevArrow: (
        <SlickButtonFix>
            <IconButton>
                <ChevronLeft />
            </IconButton>
        </SlickButtonFix>
    )
};
24reactions
minbelappscommented, Apr 9, 2021

Why is it closed? It’s a workaround, but not the solution. Why the library is injected props directly into the function’s/component’s output?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React does not recognize the `currentSlide`, ` slideCount ...
js project. While using this, console shows this warnings for both 'currentSlide' and 'slideCount' prop on a DOM element. Warning: ...
Read more >
React does not recognize the `currentSlide` prop on a DOM ...
Hello, I've just started with builder.io today, and have hit the first roadblock: I've started an instance of the next-js-example app from ...
Read more >
React does not recognize the `currentSlide`, ` slideCount ...
Coding example for the question How to solve Warning: React does not recognize the `currentSlide`, ` slideCount` prop on a DOM element-Reactjs.
Read more >
Unknown Prop Warning - React
The unknown-prop warning will fire if you attempt to render a DOM element with a prop that is not recognized by React as...
Read more >
TechinPlanet - Asked By: Anonymous I am using... - Facebook
js project. While using this, console shows this warnings for both 'currentSlide' and 'slideCount' prop on a DOM element. Warning: React does not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found