title: New instance of a class with next.js not working
body: <p>I'm trying to use a js carousel (siema) in a next.js app, but can't get it to work. I get errors no matter what I try.</p>
  
  <p>I have a slideshow component called HomeSlideShow.js:</p>
  
  <pre><code>import Head from "next/head";
  import Siema from "../.next/static/js/siema";
  
  const HomeSlideShow = props =&gt; (
   &lt;div&gt;
     &lt;Head&gt;
      &lt;script type="module" src="_next/static/js/siema.js" /&gt;
    &lt;/Head&gt;
    &lt;div className="siema"&gt;
      &lt;div&gt;Hi, I'm slide 1&lt;/div&gt;
      &lt;div&gt;Hi, I'm slide 2&lt;/div&gt;
      &lt;div&gt;Hi, I'm slide 3&lt;/div&gt;
      &lt;div&gt;Hi, I'm slide 4&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  );
  
  export default HomeSlideShow;
  </code></pre>
  
  <p>I'm importing the component in the index.js file:</p>
  
  <pre><code>import HomeSlideShow from "../components/HomeSlideShow";
  
  const Index = props =&gt; (
    &lt;Layout&gt;
     &lt;HomeSlideShow /&gt;
    &lt;/Layout&gt;
  );
  </code></pre>
  
  <p>I just don't know how to initialise the slider using:</p>
  
  <pre><code>new Siema();
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>&lt;script&gt;
   new Siema();
  &lt;/script&gt;
  </code></pre>
  
  <p>as per the docs. Wherever I try it, it errors. Any pointers?</p>
  
  <p>Thank you.</p>