`CarouselProps` plugins v2 not working with a typescript project
See original GitHub issueDescribe the bug
I’ve add the react-carousel
and the @types
package to my typescript project.
I’ve implemented the carousel as follows:
import React, { FC } from "react";
import Carousel, { autoplayPlugin } from "@brainhubeu/react-carousel";
import "@brainhubeu/react-carousel/lib/style.css";
export const CarouselComponent: FC = () => {
return (
<div>
<Carousel
plugins={[
"infinite",
"arrows",
{
resolve: autoplayPlugin,
options: {
interval: 2000,
},
},
]}
animationSpeed={1000}
draggable={false}
>
<div>
<h1>Section 1</h1>
</div>
<div>
<h1>Section 2</h1>
</div>
<div>
<h1>Section 3</h1>
</div>
</Carousel>
</div>
);
};
However none of the props seem to be applied. For reference, the draggable
prop works as intended.
Am I missing something?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
`CarouselProps` plugins v2 not working with a typescript project #656
Describe the bug I've add the react-carousel and the @types package to my typescript project. I've implemented the carousel as follows:
Read more >Breakpoints not working due typescript Interface #649 - GitHub
Hi, I' am trying to use this lib in a typescript application. When i try to define the breakpoints, it fails to transpile...
Read more >How to set up TypeScript
To do this, run npm install -g typescript . This will install the latest version (currently 4.9).
Read more >js carousel example
The plugin contains different types of sliders such as slider with ... Start using react-responsive-carousel in your project by running `npm i Check...
Read more >TypeScript | CLion Documentation - JetBrains
Verify TypeScript in the entire project. To open the Problems tool window, click the Inspections widget in the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have the same problem. We switched to v 1.19.26 to use the arrows =/
I’ve had the same issue using v2 of the library in a react/typescript project.
I solved the issue downgrading
react
andreact-dom
versions to match the peer dependencies of the library: 16.8.0.I put more details here: https://github.com/brainhubeu/react-carousel/issues/637#issuecomment-769775003