akiran / react-slick

React carousel component
http://react-slick.neostack.com/
MIT License
11.78k stars 2.11k forks source link

Support Preact #1335

Open gilnoy opened 6 years ago

gilnoy commented 6 years ago

No error in console, there is an issue with rendering - seems like a container width\height wrong calculation - i'm using the simple example in demo

drugoi commented 6 years ago

React Slick and Preact works fine with this setup (few days ago I accidentally updated dependencies in my project and everything was broken):

  "devDependencies": {
    "node-sass": "4.8.3",
    "preact-cli": "2.0.0",
    "sass-loader": "6.0.7"
  },
  "dependencies": {
    "preact": "8.2.1",
    "react-slick": "0.22.3",
    "slick-carousel": "1.8.1"
  }

I did not go deep into this question, but probably problem with SASS.

tomasdev commented 5 years ago

Not really...

✖ ERROR ../node_modules/react-slick/lib/utils/innerSliderUtils.js
Module not found: Error: Can't resolve 'react-dom' in '/Users/tomas/WORK/lala/node_modules/react-slick/lib/utils'
drugoi commented 5 years ago

@tomasdev do you use preact-compat?

tomasdev commented 5 years ago

@drugoi ended up using preact-compat, yes.

rahuljain840 commented 4 years ago

I am getting below error while using react-slick with preact 10.x in Server side rendering.

UnhandledPromiseRejectionWarning: Error: Cannot find module 'react-dom'
Require stack:
- /Users/mmt8696/Documents/demo/node_modules/react-slick/lib/inner-slider.js
- /Users/mmt8696/Documents/demo/node_modules/react-slick/lib/slider.js
- /Users/mmt8696/Documents/demo/node_modules/react-slick/lib/index.js
- /Users/mmt8696/Documents/demo/build/server/index.js

My webpack alias configuration is

alias: {
      'react': 'preact/compat',
      'react-dom': 'preact/compat'
    }