title: How to solve in ReasonReact - "This has type: (ReasonReact.reactElement, string) => unit But somewhere wanted: at <anonymous>actElement
body: <p>I have a very compact ReasonReact reducer component, which has a component, initialState, reducer, action, and render function as follows: </p>
  
  <pre><code>type actions =
    | DoNothing;
  
  let component = ReasonReact.reducerComponent("ShowHide");
  
  let make = (~name, _children) =&gt; {
    ...component,
    initialState: () =&gt; 0, /* here, state is an `int` */
    reducer: (action, state) =&gt;
      switch action {
        | DoNothing =&gt; ReasonReact.NoUpdate;
      },
    render: (self) =&gt; {
      let greeting =
        "Hello: " ++ name ++ ". You've clicked the button " ++ string_of_int(self.state) ++ " time(s)!";
      &lt;div&gt;&lt;/div&gt;
    }
  };
  </code></pre>
  
  <p>I am trying to render in my app.re file using the <code>ReactDOMRe.renderToElementWithId</code> function: </p>
  
  <pre><code>&lt;div id = "RenderShowHide"&gt;&lt;/div&gt;
          ReactDOMRe.renderToElementWithId(&lt;ShowHide name="hello" /&gt;, "RenderShowHide")
  </code></pre>
  
  <p>However, the Reason/Bucklescript compiler is complaining as follows: </p>
  
  <pre><code>This has type:
      (ReasonReact.reactElement, string) =&gt; unit
    But somewhere wanted:
      at &lt;anonymous&gt;actElement
  </code></pre>
  
  <p>However, I am having a difficulty what an actElement is. Any suggestions as to what an actElement is, and how I can go around fixing the above, would be more than appreciated. Thank you.</p>