I am getting a Uncaught (in promise) Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
error when tried to require 'react-slick` with webpack.
const React = require("react");
const Slider = require("react-slick");
function MediaCarousel(props) {
const settings = {
dots: true,
infinite: true,
speed: 500,
slidesToShow: 1,
slidesToScroll: 1
};
return !props.stories ? null : <Slider>
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
<div><h3>5</h3></div>
<div><h3>6</h3></div>
</Slider>
}
exports.MediaCarousel = MediaCarousel;