Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

How to use Custom Components as Props in rescript

$
0
0

I’m working with react-multi-carousel where i need to pass customDot in jsx it is written like below but I not sure how to do this in rescript

const CustomDot = ({ onMove, index, onClick, active }) => {
      return (
        <li
          className={active ? "active" : "inactive"}
          onClick={() => onClick()}
        >
          <MaximizeIcon />
        </li>
      );
    };

 <Carousel customDot={<CustomDot />} />

Viewing all articles
Browse latest Browse all 2592

Trending Articles