brainhubeu / react-carousel

A pure extendable React carousel, powered by Brainhub (craftsmen who ❤️ JS)
https://brainhub.eu/
MIT License
1.07k stars 164 forks source link

Error only in development side #689

Open plezploz opened 3 years ago

plezploz commented 3 years ago

Describe the bug There is a error in the console only in development. This isn't that big of a deal but is kinda annoying.

To Reproduce Steps to reproduce the behavior: React code:

import Carousel, { Dots } from '@brainhubeu/react-carousel';
import '@brainhubeu/react-carousel/lib/style.css';
import { useState } from "react";

function ImageCarousel({ images }) {
    const [value, setValue] = useState(0);

    const onChange = value => {
        setValue(value);
    };  

    return (
        <div>
            <Carousel
                plugins={['fastSwipe']}
                value={value}
                slides={images}
                onChange={onChange}
            />
            <Dots value={value} onChange={onChange} number={images.length} />
        </div>
    );
};

export default ImageCarousel;

Expected behavior No errors

Screenshots image Environment Chrome, desktop

mcmxcdev commented 3 years ago

Experiencing this as well.

GuySpotnix commented 3 years ago

+1

ebaldacchino commented 2 years ago

+1

Fixing the issue is way over my head, but based on the JS stack, the error's showing on line 69 inCarousel.js, which is:

setStrategies(strategies)

(anonymous) @ recoil.js:1431 replaceState @ recoil.js:1576 (anonymous) @ recoil.js:756 B @ recoil.js:611 et @ recoil.js:756 anonymous) @ recoil.js:2100 wi @ Carousel.js:69

vaporwavie commented 2 years ago

This will potentially get fixed by https://github.com/brainhubeu/react-carousel/pull/724