express-labs / pure-react-carousel

A highly impartial suite of React components that can be assembled by the consumer to create a carousel with almost no limits on DOM structure or CSS styles. If you're tired of fighting some other developer's CSS and DOM structure, this carousel is for you.
https://express-labs.github.io/pure-react-carousel/
MIT License
1.68k stars 161 forks source link

classNameHidden and classNameVisible not working when using Preact #351

Open andreademasi opened 3 years ago

andreademasi commented 3 years ago

What you did:

Tried setting custom classNameHidden and classNameVisible while using preact and Gatsby

What happened:

After using Preact, css classes weren't applied anymore on slide change

Reproduction:

https://github.com/andreademasi/pure-react-carousel-preact-bug

Try removing gatsby-plugin-preact from gatsby-config.js and the issue disappears

Suggested solution:

The library might be in conflict with preact, needs further investigation

Conor-Hinchee commented 3 years ago

Hey @andreademasi, I have been reviewing this issue and I have had some trouble determining the root cause. What I have been able to find out is that our Slide components are not receiving the updated state from withStore when using Preact. I think this StackOverflow discussion might be referencing the underlying issues. Do you have any other thoughts or suggestions?