title: React Materialize Carousel Autoplay
body: <p>Given the code below, I would like to make the carousel autoplay within the said interval. However, being new in React, I have no idea on how to do it. I have tried searching for answers and have tried using carousel('next'), it didn't work. I am still finding answers and is hoping to clear this problem. Thanks!</p>
  
  <pre><code>import React from 'react';
  import { Carousel } from 'react-materialize';
  
  const Header = () =&gt; {
  const imgArr = [
  'https://picsum.photos/200/300?image=0',
  'https://picsum.photos/200/300?image=1',
  'https://picsum.photos/200/300?image=2',
  ];
  
  return (
  &lt;Carousel
    className='tabs'
    options={{ duration: 100, indicators: true }}
    images={imgArr}
  /&gt;
  );
  );
  </code></pre>