Hi all!
I could really use your help!
I tried integrating flickity into my MERN based project and although I was able to find some react integrations on web, they seem to count on the fact that react is running on the client and depend on window and document objects. their dependencies rely on this fact too so there is no use in trying to hot fix this...
I tried others like nuka-carousel and react-slick - all have the same problem. All have 'window' and 'document' dependencies...
If anyone here knows a decent react based Carousel component that actually can render on the server and be integrated with MERN I would like to buy him a beer!!!
:)
Ajar
Technology is not enough. It has to serve an agenda. What's yours?
Sandeep Panda
co-founder, Hashnode
I think you should be fine with nuka-carousel. Take a look at the highlighted code here. They are binding event listeners to window resize event only inside
componentDidMount(where document and window properties are available). So, SSR shouldn't be a problem here. I am not 100% sure though. I'll try it out tonight.